summaryrefslogtreecommitdiff
path: root/project2/sql/rdbmsDataSource.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-01-03 21:44:24 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-01-04 15:52:04 +0000
commit575947589fecadef5ff5b5414c8d521d7f87fda3 (patch)
treecd4e6a3fa8d0b21353d7c6a4ebfee1e231208801 /project2/sql/rdbmsDataSource.cpp
parentA single ycm config that gets its args from b2 (diff)
downloadproject2-575947589fecadef5ff5b5414c8d521d7f87fda3.tar.bz2
project2-575947589fecadef5ff5b5414c8d521d7f87fda3.tar.xz
project2-575947589fecadef5ff5b5414c8d521d7f87fda3.zip
Use native for instead BOOST_FOREACH
Diffstat (limited to 'project2/sql/rdbmsDataSource.cpp')
-rw-r--r--project2/sql/rdbmsDataSource.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/project2/sql/rdbmsDataSource.cpp b/project2/sql/rdbmsDataSource.cpp
index 86c6a6e..b25e8dc 100644
--- a/project2/sql/rdbmsDataSource.cpp
+++ b/project2/sql/rdbmsDataSource.cpp
@@ -5,7 +5,6 @@
#include "logger.h"
#include "scripts.h"
#include <errno.h>
-#include <boost/foreach.hpp>
SimpleMessageException(UnknownConnectionProvider);
#define LOCK(l) std::lock_guard<std::mutex> _lock##l(l)
@@ -47,7 +46,7 @@ RdbmsDataSource::RdbmsDataSource(ScriptNodePtr p) :
masterDsn(p->child("masterdsn")),
preferLocal(p->value("preferlocal", true, NULL))
{
- BOOST_FOREACH(ScriptNodePtr node, p->childrenIn("readonly")) {
+ for (ScriptNodePtr node : p->childrenIn("readonly")) {
roDSNs.insert(ReadonlyDSNs::value_type(node->value("host", NULL).as<std::string>(), node));
}
}
@@ -106,7 +105,7 @@ RdbmsDataSource::getReadonly() const
// Failed to connect to a preferred DB... carry on and try the others...
}
}
- BOOST_FOREACH(ReadonlyDSNs::value_type db, roDSNs) {
+ for (ReadonlyDSNs::value_type db : roDSNs) {
try {
return connectTo(db.second).get();
}