aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/property_tree.cpp
diff options
context:
space:
mode:
authorAndrej Rode <andrej.rode@ettus.com>2017-02-09 23:19:55 -0800
committerMartin Braun <martin.braun@ettus.com>2017-02-10 16:44:33 -0800
commit26cc20847cde543e759aa5cee9a27eaa69c5dd9e (patch)
treeeee102333381e2313af59e725d6b7a06b665161f /host/lib/property_tree.cpp
parentf3a004faf7d50cbb5564f5e2f67f54ee07e051dd (diff)
downloaduhd-26cc20847cde543e759aa5cee9a27eaa69c5dd9e.tar.gz
uhd-26cc20847cde543e759aa5cee9a27eaa69c5dd9e.tar.bz2
uhd-26cc20847cde543e759aa5cee9a27eaa69c5dd9e.zip
uhd: replace BOOST_FOREACH with C++11 range-based for loop
Note: This is the first commit that uses for-range, and range-based for-loops are now usable for UHD development.
Diffstat (limited to 'host/lib/property_tree.cpp')
-rw-r--r--host/lib/property_tree.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/host/lib/property_tree.cpp b/host/lib/property_tree.cpp
index 76d7bccba..d62f61878 100644
--- a/host/lib/property_tree.cpp
+++ b/host/lib/property_tree.cpp
@@ -17,7 +17,6 @@
#include <uhd/property_tree.hpp>
#include <uhd/types/dict.hpp>
-#include <boost/foreach.hpp>
#include <boost/thread/mutex.hpp>
#include <boost/make_shared.hpp>
#include <iostream>
@@ -98,7 +97,7 @@ public:
node_type *parent = NULL;
node_type *node = &_guts->root;
- BOOST_FOREACH(const std::string &name, path_tokenizer(path)){
+ for(const std::string &name: path_tokenizer(path)){
if (not node->has_key(name)) throw_path_not_found(path);
parent = node;
node = &(*node)[name];
@@ -112,7 +111,7 @@ public:
boost::mutex::scoped_lock lock(_guts->mutex);
node_type *node = &_guts->root;
- BOOST_FOREACH(const std::string &name, path_tokenizer(path)){
+ for(const std::string &name: path_tokenizer(path)){
if (not node->has_key(name)) return false;
node = &(*node)[name];
}
@@ -124,7 +123,7 @@ public:
boost::mutex::scoped_lock lock(_guts->mutex);
node_type *node = &_guts->root;
- BOOST_FOREACH(const std::string &name, path_tokenizer(path)){
+ for(const std::string &name: path_tokenizer(path)){
if (not node->has_key(name)) throw_path_not_found(path);
node = &(*node)[name];
}
@@ -137,7 +136,7 @@ public:
boost::mutex::scoped_lock lock(_guts->mutex);
node_type *node = &_guts->root;
- BOOST_FOREACH(const std::string &name, path_tokenizer(path)){
+ for(const std::string &name: path_tokenizer(path)){
if (not node->has_key(name)) (*node)[name] = node_type();
node = &(*node)[name];
}
@@ -150,7 +149,7 @@ public:
boost::mutex::scoped_lock lock(_guts->mutex);
node_type *node = &_guts->root;
- BOOST_FOREACH(const std::string &name, path_tokenizer(path)){
+ for(const std::string &name: path_tokenizer(path)){
if (not node->has_key(name)) throw_path_not_found(path);
node = &(*node)[name];
}