Skip to content
Snippets Groups Projects
Commit a1b7207e authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[BL] ConfigTree; Fix arguments of xxxIterator ctor

 - The Iterator type is trivial; passing it by const&.
 - The std::string root is invoked only on const& strings, so
moving it does not save anything in this context.
parent 28e2719e
No related branches found
No related tags found
No related merge requests found
......@@ -106,9 +106,9 @@ public:
public:
using Iterator = boost::property_tree::ptree::const_assoc_iterator;
explicit SubtreeIterator(Iterator it, std::string root,
explicit SubtreeIterator(Iterator const& it, std::string const& root,
ConfigTree const& parent)
: _it(it), _tagname(std::move(root)), _parent(parent)
: _it(it), _tagname(root), _parent(parent)
{}
SubtreeIterator& operator++() {
......@@ -180,9 +180,9 @@ public:
public:
using Iterator = boost::property_tree::ptree::const_assoc_iterator;
explicit ValueIterator(Iterator it, std::string root,
explicit ValueIterator(Iterator const& it, std::string const& root,
ConfigTree const& parent)
: _it(it), _tagname(std::move(root)), _parent(parent)
: _it(it), _tagname(root), _parent(parent)
{}
ValueIterator<ValueType>& operator++() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment