summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrian Szyndela <adrian.s@samsung.com>2020-10-14 08:07:10 +0200
committerAdrian Szyndela <adrian.s@samsung.com>2020-10-26 16:36:56 +0100
commit3c305debe0f6078ef6b9bc5d131f0d0ccd975bed (patch)
treec69183b1d4b044c443232924f509a2fabe7bd7ff
parent434396148108ae1dad3215ed696e984b9930caaf (diff)
downloadlibdbuspolicy-3c305debe0f6078ef6b9bc5d131f0d0ccd975bed.tar.gz
libdbuspolicy-3c305debe0f6078ef6b9bc5d131f0d0ccd975bed.tar.bz2
libdbuspolicy-3c305debe0f6078ef6b9bc5d131f0d0ccd975bed.zip
own_tree: make ordered map, we need it sorted anyway
Change-Id: Iaac12479580b1502bc459387b64b7dda12ce9bef
-rw-r--r--src/internal/own_tree.cpp4
-rw-r--r--src/internal/own_tree.hpp6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/internal/own_tree.cpp b/src/internal/own_tree.cpp
index 5cc7ead..5eecc06 100644
--- a/src/internal/own_tree.cpp
+++ b/src/internal/own_tree.cpp
@@ -17,7 +17,7 @@
#include <boost/tokenizer.hpp>
#include <deque>
#include <iostream>
-#include <unordered_map>
+#include <map>
/**
* \file
@@ -106,6 +106,6 @@ const DecisionItem &TreeNode::getOwnDecisionItem() const {
return __own_decision_item;
}
-const std::unordered_map<std::string, std::shared_ptr<TreeNode>> &TreeNode::getChildren() const {
+const std::map<std::string, std::shared_ptr<TreeNode>> &TreeNode::getChildren() const {
return __children;
}
diff --git a/src/internal/own_tree.hpp b/src/internal/own_tree.hpp
index 54038d1..b65be39 100644
--- a/src/internal/own_tree.hpp
+++ b/src/internal/own_tree.hpp
@@ -25,7 +25,7 @@
#include "policy.hpp"
#include <memory>
-#include <unordered_map>
+#include <map>
#include <deque>
namespace ldp_xml_parser
@@ -39,14 +39,14 @@ namespace ldp_xml_parser
const std::string &getToken() const;
const DecisionItem &getOwnPrefixDecisionItem() const;
const DecisionItem &getOwnDecisionItem() const;
- const std::unordered_map<std::string, std::shared_ptr<TreeNode>> &getChildren() const;
+ const std::map<std::string, std::shared_ptr<TreeNode>> &getChildren() const;
private:
DecisionItem prefixBasedDecision() const;
std::string __token; // element of dot-separated name
DecisionItem __own_prefix_decision_item;
DecisionItem __own_decision_item;
- std::unordered_map<std::string, std::shared_ptr<TreeNode>> __children;
+ std::map<std::string, std::shared_ptr<TreeNode>> __children;
friend class OwnershipTree;
};