summaryrefslogtreecommitdiff
path: root/configmgr/source/modifications.cxx
diff options
context:
space:
mode:
authorJakub Trzebiatowski <ubap.dev@gmail.com>2016-03-07 19:48:23 +0100
committerNoel Grandin <noelgrandin@gmail.com>2016-03-15 06:26:57 +0000
commit89e0663c55f7f1763536a345d63111115c71ef26 (patch)
treebb9a3a82a3f462cb72242e02c0a974285a80d40a /configmgr/source/modifications.cxx
parent869262bcc980d1d964036dbaba87a456479f53b7 (diff)
tdf#96099 fix trival typedefs, Path to std::vector<OUString>
Change-Id: I23fca48becbfdfd92db02a11b739a668fc1cd8c4 Reviewed-on: https://gerrit.libreoffice.org/23007 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'configmgr/source/modifications.cxx')
-rw-r--r--configmgr/source/modifications.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/configmgr/source/modifications.cxx b/configmgr/source/modifications.cxx
index 6b8cdf60aab3..630de8fbc8a6 100644
--- a/configmgr/source/modifications.cxx
+++ b/configmgr/source/modifications.cxx
@@ -24,7 +24,6 @@
#include <rtl/ustring.hxx>
#include "modifications.hxx"
-#include "path.hxx"
namespace configmgr {
@@ -32,10 +31,10 @@ Modifications::Modifications() {}
Modifications::~Modifications() {}
-void Modifications::add(Path const & path) {
+void Modifications::add(std::vector<OUString> const & path) {
Node * p = &root_;
bool wasPresent = false;
- for (Path::const_iterator i(path.begin()); i != path.end(); ++i) {
+ for (auto i(path.begin()); i != path.end(); ++i) {
Node::Children::iterator j(p->children.find(*i));
if (j == p->children.end()) {
if (wasPresent && p->children.empty()) {
@@ -52,10 +51,10 @@ void Modifications::add(Path const & path) {
p->children.clear();
}
-void Modifications::remove(Path const & path) {
+void Modifications::remove(std::vector<OUString> const & path) {
assert(!path.empty());
Node * p = &root_;
- for (Path::const_iterator i(path.begin());;) {
+ for (auto i(path.begin());;) {
Node::Children::iterator j(p->children.find(*i));
if (j == p->children.end()) {
break;
@@ -63,7 +62,7 @@ void Modifications::remove(Path const & path) {
if (++i == path.end()) {
p->children.erase(j);
if (p->children.empty()) {
- Path parent(path);
+ std::vector<OUString> parent(path);
parent.pop_back();
remove(parent);
}