summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-01-03 04:19:51 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2015-01-03 04:19:51 +0000
commit4dda631e9922653a1c20aaaf23aabd41ce2b9072 (patch)
tree27d7b0cffc759b1e2b25e899323e2ca2f700a44a
parentAdd support for updating instead of deleting when merging records (diff)
downloadproject2-4dda631e9922653a1c20aaaf23aabd41ce2b9072.tar.bz2
project2-4dda631e9922653a1c20aaaf23aabd41ce2b9072.tar.xz
project2-4dda631e9922653a1c20aaaf23aabd41ce2b9072.zip
Use native for instead BOOST_FOREACH
-rw-r--r--project2/common/checkHost.cpp3
-rw-r--r--project2/common/definedColumns.cpp3
-rw-r--r--project2/common/definedColumns.h1
-rw-r--r--project2/common/execContext.cpp3
-rw-r--r--project2/common/fileStrmVarWriter.cpp1
-rw-r--r--project2/common/iHaveParameters.cpp3
-rw-r--r--project2/common/iHaveSubTasks.cpp3
-rw-r--r--project2/common/if.cpp3
-rw-r--r--project2/common/instanceStore.h1
-rw-r--r--project2/common/instanceStore.impl.h5
-rw-r--r--project2/common/iterate.cpp3
-rw-r--r--project2/common/logger.cpp5
-rw-r--r--project2/common/noOutputExecute.cpp1
-rw-r--r--project2/common/options.cpp7
-rw-r--r--project2/common/optionsSource.cpp3
-rw-r--r--project2/common/pch.hpp1
-rw-r--r--project2/common/presenter.cpp1
-rw-r--r--project2/common/presenterCache.cpp1
-rw-r--r--project2/common/rowProcessor.cpp9
-rw-r--r--project2/common/rowSet.cpp5
-rw-r--r--project2/common/rowSetCache.cpp5
-rw-r--r--project2/common/scriptLoader.cpp9
-rw-r--r--project2/common/scripts.cpp3
-rw-r--r--project2/common/session.cpp3
-rw-r--r--project2/common/task.cpp1
-rw-r--r--project2/common/taskHost.cpp5
-rw-r--r--project2/common/transform.cpp5
-rw-r--r--project2/common/variables.cpp1
-rw-r--r--project2/common/variables/literal.cpp3
-rw-r--r--project2/common/variables/lookup.cpp7
-rw-r--r--project2/common/viewHost.cpp5
-rw-r--r--project2/files/optionsSource.cpp2
-rw-r--r--project2/ice/iceBase.cpp2
-rw-r--r--project2/ice/iceCompile.cpp4
-rw-r--r--project2/streams/streamNvpRows.cpp3
-rw-r--r--project2/ut/testOptionsSource.cpp2
-rw-r--r--project2/ut/testScriptHost.cpp2
37 files changed, 46 insertions, 78 deletions
diff --git a/project2/common/checkHost.cpp b/project2/common/checkHost.cpp
index dedea85..a900d7a 100644
--- a/project2/common/checkHost.cpp
+++ b/project2/common/checkHost.cpp
@@ -1,7 +1,6 @@
#include <pch.hpp>
#include "checkHost.h"
#include "execContext.h"
-#include <boost/foreach.hpp>
CheckHost::CheckHost(ScriptNodePtr s) :
CommonObjects(s)
@@ -17,7 +16,7 @@ void
CheckHost::runChecks(ExecContext * ec) const
{
loadScriptComponents();
- BOOST_FOREACH(const Checks::value_type & pc, checks) {
+ for (const Checks::value_type & pc : checks) {
if (!pc->performCheck(ec)) {
ec->logMessage(false, pc->group(ec), pc->message(ec));
throw CheckFailure(pc);
diff --git a/project2/common/definedColumns.cpp b/project2/common/definedColumns.cpp
index 160b0bc..9c51d49 100644
--- a/project2/common/definedColumns.cpp
+++ b/project2/common/definedColumns.cpp
@@ -2,12 +2,11 @@
#include "definedColumns.h"
#include "scripts.h"
#include <boost/function.hpp>
-#include <boost/foreach.hpp>
DefinedColumns::DefinedColumns(ScriptNodePtr p, const Glib::ustring & colPath, const ColCreator & func)
{
unsigned int colNo = 0;
- BOOST_FOREACH(ScriptNodePtr node, p->childrenIn(colPath)) {
+ for (ScriptNodePtr node : p->childrenIn(colPath)) {
columns.insert(func(colNo++, node));
}
}
diff --git a/project2/common/definedColumns.h b/project2/common/definedColumns.h
index 89d42be..2f53669 100644
--- a/project2/common/definedColumns.h
+++ b/project2/common/definedColumns.h
@@ -1,7 +1,6 @@
#ifndef DEFINEDCOLUMNS_H
#define DEFINEDCOLUMNS_H
-#include <boost/foreach.hpp>
#include "variables.h"
#include "rowSet.h"
#include "columns.h"
diff --git a/project2/common/execContext.cpp b/project2/common/execContext.cpp
index 571b5f0..e39c72c 100644
--- a/project2/common/execContext.cpp
+++ b/project2/common/execContext.cpp
@@ -1,7 +1,6 @@
#include "execContext.h"
#include "logger.h"
#include "presenter.h"
-#include <boost/foreach.hpp>
void
ExecContext::logMessage(bool writeLog, const Glib::ustring & g, const Glib::ustring & m)
@@ -18,7 +17,7 @@ ExecContext::addContextData(const MultiRowSetPresenter * p) const
// Message log
p->addNewRowSet("messages", Scripts::scriptNamespacePrefix);
p->addNewArray("message", true);
- BOOST_FOREACH(const Messages::value_type & m, messages) {
+ for (const Messages::value_type & m : messages) {
p->addNewRow("message");
p->addAttribute("group", m->group);
p->addAttribute("text", m->message);
diff --git a/project2/common/fileStrmVarWriter.cpp b/project2/common/fileStrmVarWriter.cpp
index cdd7818..bb3e82f 100644
--- a/project2/common/fileStrmVarWriter.cpp
+++ b/project2/common/fileStrmVarWriter.cpp
@@ -2,7 +2,6 @@
#include "fileStrmVarWriter.h"
#include "rowSet.h"
#include "scriptLoader.h"
-#include <boost/foreach.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <stdio.h>
diff --git a/project2/common/iHaveParameters.cpp b/project2/common/iHaveParameters.cpp
index 1bf1362..c3effdf 100644
--- a/project2/common/iHaveParameters.cpp
+++ b/project2/common/iHaveParameters.cpp
@@ -2,13 +2,12 @@
#include "iHaveParameters.h"
#include "exceptions.h"
#include "safeMapFind.h"
-#include <boost/foreach.hpp>
IHaveParameters::Stack IHaveParameters::scope;
IHaveParameters::IHaveParameters(ScriptNodePtr p)
{
- BOOST_FOREACH(ScriptNodePtr node, p->childrenIn("parameters")) {
+ for (ScriptNodePtr node : p->childrenIn("parameters")) {
parameters.insert(Parameters::value_type(node->get_name(), Variable(node)));
}
}
diff --git a/project2/common/iHaveSubTasks.cpp b/project2/common/iHaveSubTasks.cpp
index 92248fb..6371475 100644
--- a/project2/common/iHaveSubTasks.cpp
+++ b/project2/common/iHaveSubTasks.cpp
@@ -1,6 +1,5 @@
#include <pch.hpp>
#include "iHaveSubTasks.h"
-#include <boost/foreach.hpp>
IHaveSubTasks::IHaveSubTasks(ScriptNodePtr e) :
SourceObject(e),
@@ -15,7 +14,7 @@ IHaveSubTasks::~IHaveSubTasks()
void
IHaveSubTasks::run(const Tasks & tlist, ExecContext * ec) const
{
- BOOST_FOREACH(const Tasks::value_type & t, tlist) {
+ for (const Tasks::value_type & t : tlist) {
t->execute(ec);
}
}
diff --git a/project2/common/if.cpp b/project2/common/if.cpp
index ed2abf6..bdd9835 100644
--- a/project2/common/if.cpp
+++ b/project2/common/if.cpp
@@ -2,7 +2,6 @@
#include "if.h"
#include "logger.h"
#include "scriptLoader.h"
-#include <boost/foreach.hpp>
#include <boost/bind.hpp>
#include <algorithm>
@@ -33,7 +32,7 @@ If::execute(const MultiRowSetPresenter * presenter, ExecContext * ec) const
{
if (passes(ec)) {
Logger()->messagef(LOG_DEBUG, "Test passed; showing %zu views", subViews.size());
- BOOST_FOREACH(const SubViews::value_type & sq, subViews) {
+ for (const SubViews::value_type & sq : subViews) {
sq->execute(presenter, ec);
}
}
diff --git a/project2/common/instanceStore.h b/project2/common/instanceStore.h
index 9a669ef..fc57be7 100644
--- a/project2/common/instanceStore.h
+++ b/project2/common/instanceStore.h
@@ -1,7 +1,6 @@
#ifndef INSTANCESTORE_H
#define INSTANCESTORE_H
-#include <boost/foreach.hpp>
#include <boost/function.hpp>
#include <set>
#include <map>
diff --git a/project2/common/instanceStore.impl.h b/project2/common/instanceStore.impl.h
index dd64bd7..2a2f497 100644
--- a/project2/common/instanceStore.impl.h
+++ b/project2/common/instanceStore.impl.h
@@ -1,5 +1,4 @@
#include "instanceStore.h"
-#include <boost/foreach.hpp>
#include <boost/assert.hpp>
template <class Type, class StoreType>
@@ -66,7 +65,7 @@ template <class Type, class KeyType>
void
InstanceMap<Type, KeyType>::OnEach(const boost::function<void(const Value &)> & func)
{
- BOOST_FOREACH(const auto & l, IStore::GetAll()) {
+ for (const auto & l : IStore::GetAll()) {
func(l);
}
IStore::prune();
@@ -76,7 +75,7 @@ template <class Type>
void
InstanceSet<Type>::OnAll(const boost::function<void(Type *)> & func)
{
- BOOST_FOREACH(const auto & l, IStore::GetAll()) {
+ for (const auto & l : IStore::GetAll()) {
func(l.get());
}
IStore::prune();
diff --git a/project2/common/iterate.cpp b/project2/common/iterate.cpp
index 4473885..ae73cdb 100644
--- a/project2/common/iterate.cpp
+++ b/project2/common/iterate.cpp
@@ -1,7 +1,6 @@
#include <pch.hpp>
#include "iterate.h"
#include "logger.h"
-#include <boost/foreach.hpp>
#include <boost/bind.hpp>
#include "scriptLoader.h"
#include "scopeObject.h"
@@ -35,7 +34,7 @@ Iterate::execute(ExecContext * ec) const
void
Iterate::executeChildren(ExecContext * ec) const
{
- BOOST_FOREACH(const Tasks::value_type & sq, normal) {
+ for (const Tasks::value_type & sq : normal) {
sq->execute(ec);
}
}
diff --git a/project2/common/logger.cpp b/project2/common/logger.cpp
index dcdd1ab..95c2b15 100644
--- a/project2/common/logger.cpp
+++ b/project2/common/logger.cpp
@@ -2,7 +2,6 @@
#define SYSLOG_NAMES 1 // Enables the definition of names in syslog.h
#include "logger.h"
-#include <boost/foreach.hpp>
#include "instanceStore.impl.h"
Log Logger::log;
@@ -27,7 +26,7 @@ Log::setLoggerAt(LogDriverLoader * ldr, int level)
logs[ldr] = ldr->create();
}
lowestLevel = -1;
- BOOST_FOREACH(const auto & log, InstanceSet<LogDriverLoader>::GetAll()) {
+ for (const auto & log : InstanceSet<LogDriverLoader>::GetAll()) {
if (log->loggerLevel() > lowestLevel) {
lowestLevel = log->loggerLevel();
}
@@ -50,7 +49,7 @@ void
Log::message(int priority, const char * msg) const
{
if (priority > lowestLevel) return;
- BOOST_FOREACH(const LogDrivers::value_type & l, logs) {
+ for (const LogDrivers::value_type & l : logs) {
l.second->message(priority, msg);
}
}
diff --git a/project2/common/noOutputExecute.cpp b/project2/common/noOutputExecute.cpp
index 02c8f71..bed7bf0 100644
--- a/project2/common/noOutputExecute.cpp
+++ b/project2/common/noOutputExecute.cpp
@@ -1,6 +1,5 @@
#include <pch.hpp>
#include "noOutputExecute.h"
-#include <boost/foreach.hpp>
NoOutputExecute::NoOutputExecute(ScriptNodePtr p) :
SourceObject(p)
diff --git a/project2/common/options.cpp b/project2/common/options.cpp
index 3000069..c1ed762 100644
--- a/project2/common/options.cpp
+++ b/project2/common/options.cpp
@@ -1,6 +1,5 @@
#include <pch.hpp>
#include "options.h"
-#include <boost/foreach.hpp>
#include "instanceStore.impl.h"
class NamedOption : public Options::Option {
@@ -102,7 +101,7 @@ Options::operator()(OptionPtr o)
void
Options::reset() const
{
- BOOST_FOREACH(const OptionPtr & o, options) {
+ for (const OptionPtr & o : options) {
o->reset();
}
}
@@ -110,7 +109,7 @@ Options::reset() const
void
Options::consume(const Glib::ustring & n, const Glib::ustring & p, const VariableType & v, const Options::CurrentPlatform & cp) const
{
- BOOST_FOREACH(const OptionPtr & o, options) {
+ for (const OptionPtr & o : options) {
o->consume(n, p, v, cp);
}
}
@@ -123,7 +122,7 @@ Options::allOptions() const
const Options::Option *
Options::find(const Glib::ustring & n) const {
- BOOST_FOREACH(const OptionPtr & o, options) {
+ for (const OptionPtr & o : options) {
if (o->accepts(n)) {
return o.get();
}
diff --git a/project2/common/optionsSource.cpp b/project2/common/optionsSource.cpp
index 1665557..0e1d751 100644
--- a/project2/common/optionsSource.cpp
+++ b/project2/common/optionsSource.cpp
@@ -1,6 +1,5 @@
#include "optionsSource.h"
#include "logger.h"
-#include <boost/foreach.hpp>
#include "instanceStore.impl.h"
class DefaultConfigConsumer : public ConfigConsumer {
@@ -33,7 +32,7 @@ OptionsSource::loadSources(const Options::CurrentPlatform & platform)
DefaultConfigConsumer dcc;
std::set<boost::shared_ptr<OptionsSource>> loadedConfigs;
while (loadedConfigs.size() != configs.size()) {
- BOOST_FOREACH(const auto & c, configs) {
+ for (const auto & c : configs) {
if (loadedConfigs.find(c) == loadedConfigs.end()) {
c->loadInto(dcc, platform);
loadedConfigs.insert(c);
diff --git a/project2/common/pch.hpp b/project2/common/pch.hpp
index d750ce4..a18ebbb 100644
--- a/project2/common/pch.hpp
+++ b/project2/common/pch.hpp
@@ -6,7 +6,6 @@
#include <boost/any.hpp>
#include <boost/bind.hpp>
#include <boost/filesystem/path.hpp>
-#include <boost/foreach.hpp>
#include <boost/function.hpp>
#include <boost/intrusive_ptr.hpp>
#include <boost/multi_index_container.hpp>
diff --git a/project2/common/presenter.cpp b/project2/common/presenter.cpp
index 35f5f2c..012020d 100644
--- a/project2/common/presenter.cpp
+++ b/project2/common/presenter.cpp
@@ -2,7 +2,6 @@
#include "presenter.h"
#include "dataSource.h"
#include "instanceStore.impl.h"
-#include <boost/foreach.hpp>
NameValuePairPresenter::NameValuePairPresenter()
{
diff --git a/project2/common/presenterCache.cpp b/project2/common/presenterCache.cpp
index 1b56db8..78122d0 100644
--- a/project2/common/presenterCache.cpp
+++ b/project2/common/presenterCache.cpp
@@ -1,5 +1,4 @@
#include "presenterCache.h"
-#include <boost/foreach.hpp>
PresenterCache::PresenterCache(ScriptNodePtr s) :
SourceObject(s),
diff --git a/project2/common/rowProcessor.cpp b/project2/common/rowProcessor.cpp
index 85cd698..2e695cf 100644
--- a/project2/common/rowProcessor.cpp
+++ b/project2/common/rowProcessor.cpp
@@ -3,7 +3,6 @@
#include "logger.h"
#include "commonObjects.h"
#include "scopeObject.h"
-#include <boost/foreach.hpp>
#include <boost/algorithm/string/predicate.hpp>
RowProcessor::RowProcessor(ScriptNodePtr p) :
@@ -32,7 +31,7 @@ RowProcessor::execute(ExecContext * ec, const RowProcessorCallback & cb) const
boost::bind(&RowProcessor::saveCaches, this, ec),
boost::bind((CROE ? &RowProcessor::saveCaches : &RowProcessor::discardCaches), this, ec),
boost::bind(&TargetCaches::clear, &tc));
- BOOST_FOREACH(const auto & c, caches) {
+ for (const auto & c : caches) {
if (c->checkAndExecute(ec, source->name, filter, this, cb)) {
return;
}
@@ -62,7 +61,7 @@ RowProcessor::execute(ExecContext * ec, const RowProcessorCallback & cb) const
void
RowProcessor::saveCaches(ExecContext * ec) const
{
- BOOST_FOREACH(const TargetCaches::value_type & c, tc) {
+ for (const TargetCaches::value_type & c : tc) {
c->get<1>()->save(ec, source->name, filter, this);
}
}
@@ -70,7 +69,7 @@ RowProcessor::saveCaches(ExecContext * ec) const
void
RowProcessor::discardCaches(ExecContext * ec) const
{
- BOOST_FOREACH(const TargetCaches::value_type & c, tc) {
+ for (const TargetCaches::value_type & c : tc) {
c->get<1>()->discard(ec, source->name, filter, this);
}
}
@@ -78,7 +77,7 @@ RowProcessor::discardCaches(ExecContext * ec) const
void
RowProcessor::rowReadyInternal(const RowState * rs, const RowProcessorCallback & cb, ExecContext * ec) const
{
- BOOST_FOREACH(const TargetCaches::value_type & c, tc) {
+ for (const TargetCaches::value_type & c : tc) {
c->get<0>()->addNewRow(filter.empty() ? "row" : filter);
rs->foreachColumn(ec, boost::bind(&RowSetPresenter::addNamedValue, c->get<0>(), _2, _3));
rs->foreachAttr(boost::bind(&RowSetPresenter::addAttribute, c->get<0>(), _1, _2));
diff --git a/project2/common/rowSet.cpp b/project2/common/rowSet.cpp
index 59fde70..6ec2f94 100644
--- a/project2/common/rowSet.cpp
+++ b/project2/common/rowSet.cpp
@@ -4,7 +4,6 @@
#include "scopeObject.h"
#include "logger.h"
#include "variables.h"
-#include <boost/foreach.hpp>
#include <boost/bind.hpp>
RowState::RowValuesStack RowState::stack;
@@ -42,7 +41,7 @@ RowState::process(const RowProcessorCallback & rp, bool r)
void
RowState::reset()
{
- BOOST_FOREACH(FieldValues::value_type & v, fields) {
+ for (FieldValues::value_type & v : fields) {
v = Null();
}
}
@@ -86,7 +85,7 @@ void
RowState::foreachColumn(ExecContext * ec, const ColumnAction & action) const
{
const Columns & columns = getColumns();
- BOOST_FOREACH(const Columns::value_type & col, columns.get<byColName>()) {
+ for (const Columns::value_type & col : columns.get<byColName>()) {
action(col->idx, col->name, (!boost::get<Null>(&fields[col->idx])) ? fields[col->idx] : col->defValue(ec));
}
}
diff --git a/project2/common/rowSetCache.cpp b/project2/common/rowSetCache.cpp
index 23ae177..95a949b 100644
--- a/project2/common/rowSetCache.cpp
+++ b/project2/common/rowSetCache.cpp
@@ -3,7 +3,6 @@
#include "rowSet.h"
#include "rowProcessor.h"
#include "logger.h"
-#include <boost/foreach.hpp>
#include <glibmm/exception.h>
RowSetCache::RowSetCache(ScriptNodePtr p) :
@@ -38,11 +37,11 @@ bool RowSetCache::checkAndExecute(ExecContext * ec, const Glib::ustring & n, con
void
RowSetCache::applyKeys(ExecContext * ec, const KeyApplier & f, const IHaveParameters * ps) const
{
- BOOST_FOREACH(const IHaveParameters::Parameters::value_type & p, allParameters()) {
+ for (const IHaveParameters::Parameters::value_type & p : allParameters()) {
f(p.first, p.second(ec));
}
if (inherit) {
- BOOST_FOREACH(const IHaveParameters::Parameters::value_type & p, ps->allParameters()) {
+ for (const IHaveParameters::Parameters::value_type & p : ps->allParameters()) {
f(p.first, p.second(ec));
}
}
diff --git a/project2/common/scriptLoader.cpp b/project2/common/scriptLoader.cpp
index 93ed639..185f18d 100644
--- a/project2/common/scriptLoader.cpp
+++ b/project2/common/scriptLoader.cpp
@@ -4,7 +4,6 @@
#include "scriptStorage.h"
#include "library.h"
#include <boost/shared_ptr.hpp>
-#include <boost/foreach.hpp>
#include <boost/function.hpp>
#include <boost/function_equal.hpp>
#include "instanceStore.impl.h"
@@ -80,7 +79,7 @@ LoaderBase::collectAll(ScriptNodePtr node, bool childrenOnly, const StorerPtrs &
unsigned int stored = 0;
created += 1;
if (!node->obj) {
- BOOST_FOREACH(const StorerPtr & s, sts) {
+ for (const StorerPtr & s : sts) {
try {
node->obj = s->create(node);
break;
@@ -97,7 +96,7 @@ LoaderBase::collectAll(ScriptNodePtr node, bool childrenOnly, const StorerPtrs &
LoaderBase::loadedObjects.insert(p.get());
}
}
- BOOST_FOREACH(const StorerPtr & s, sts) {
+ for (const StorerPtr & s : sts) {
if (s->save(node->obj, node)) {
stored += 1;
if (!s->cacheable(node)) {
@@ -111,7 +110,7 @@ LoaderBase::collectAll(ScriptNodePtr node, bool childrenOnly, const StorerPtrs &
}
}
if (created == 0 && (recursive || childrenOnly)) {
- BOOST_FOREACH(ScriptNodePtr child, node->children()) {
+ for (ScriptNodePtr child : node->children()) {
collectAll(child, false, sts);
}
}
@@ -131,7 +130,7 @@ LoaderBase::collectAll(const CommonObjects * co, bool childrenOnly, ScriptNodePt
targets.erase(i);
}
if (co) {
- BOOST_FOREACH(SourceObjectPtr o, loadedObjects) {
+ for (SourceObjectPtr o : loadedObjects) {
o->loadComplete(co);
}
loadedObjects.clear();
diff --git a/project2/common/scripts.cpp b/project2/common/scripts.cpp
index 8801841..4f80b1a 100644
--- a/project2/common/scripts.cpp
+++ b/project2/common/scripts.cpp
@@ -3,7 +3,6 @@
#include "variables/fixed.h"
#include <boost/filesystem/convenience.hpp>
#include <boost/tuple/tuple_comparison.hpp>
-#include <boost/foreach.hpp>
ScriptReader::ScriptCache ScriptReader::scriptCache;
@@ -84,7 +83,7 @@ ScriptReader::resolveScript(const std::string & group, const std::string & name,
return i->second;
}
else {
- BOOST_FOREACH(const auto & rl, InstanceSet<ScriptReaderLoader>::GetAll()) {
+ for (const auto & rl : InstanceSet<ScriptReaderLoader>::GetAll()) {
ScriptReaderPtr rs = rl->resolveScript(group, e.string());
if (rs) {
return (scriptCache[sk] = rs);
diff --git a/project2/common/session.cpp b/project2/common/session.cpp
index 7464a21..cba5397 100644
--- a/project2/common/session.cpp
+++ b/project2/common/session.cpp
@@ -1,7 +1,6 @@
#include <pch.hpp>
#include "session.h"
#include "safeMapFind.h"
-#include <boost/foreach.hpp>
#include <boost/uuid/uuid_generators.hpp>
Session::Session()
@@ -56,7 +55,7 @@ Session::ClearValue(const Glib::ustring & name)
void
Session::ForeachValue(const Session::SVH & svh) const
{
- BOOST_FOREACH(const Values::value_type & v, vars) {
+ for (const Values::value_type & v : vars) {
svh(v.first, v.second);
}
}
diff --git a/project2/common/task.cpp b/project2/common/task.cpp
index c4275f8..2cfe761 100644
--- a/project2/common/task.cpp
+++ b/project2/common/task.cpp
@@ -1,6 +1,5 @@
#include <pch.hpp>
#include "task.h"
-#include <boost/foreach.hpp>
Task::Task(ScriptNodePtr p) :
SourceObject(p),
diff --git a/project2/common/taskHost.cpp b/project2/common/taskHost.cpp
index 07f7601..943e09a 100644
--- a/project2/common/taskHost.cpp
+++ b/project2/common/taskHost.cpp
@@ -5,7 +5,6 @@
#include "scopeObject.h"
#include "scriptLoader.h"
#include "commonObjects.h"
-#include <boost/foreach.hpp>
TaskHost::TaskHost(ScriptNodePtr s) :
SourceObject(s),
@@ -37,7 +36,7 @@ TaskHost::execute(ExecContext * ec) const
void
TaskHost::commitAll() const
{
- BOOST_FOREACH(const CommonObjects::DataSources::value_type & ds, CommonObjects::datasources) {
+ for (const CommonObjects::DataSources::value_type & ds : CommonObjects::datasources) {
ds.second->commit();
}
}
@@ -45,7 +44,7 @@ TaskHost::commitAll() const
void
TaskHost::rollbackAll() const
{
- BOOST_FOREACH(const CommonObjects::DataSources::value_type & ds, CommonObjects::datasources) {
+ for (const CommonObjects::DataSources::value_type & ds : CommonObjects::datasources) {
ds.second->rollback();
}
}
diff --git a/project2/common/transform.cpp b/project2/common/transform.cpp
index 5f64de7..37173c7 100644
--- a/project2/common/transform.cpp
+++ b/project2/common/transform.cpp
@@ -3,7 +3,6 @@
#include "logger.h"
#include "ostreamWrapper.h"
#include "scriptStorage.h"
-#include <boost/foreach.hpp>
#include "instanceStore.impl.h"
class TransformTargetStorer : public Storer {
@@ -47,7 +46,7 @@ typedef std::map<std::string, boost::shared_ptr<TransformLoader> > TransformLoad
void
TransformSource::addTarget(TransformChainLinkPtr tcl, ExecContext * ec, ScriptNodePtr e)
{
- BOOST_FOREACH(const auto & tl, InstanceSet<TransformLoader>::GetAll()) {
+ for (const auto & tl : InstanceSet<TransformLoader>::GetAll()) {
TransformPtr t = tl->create();
if (t->canTransform(this, tcl.get())) {
if (e) {
@@ -75,7 +74,7 @@ TransformSource::removeTarget(TransformChainLinkPtr tcl)
void
TransformSource::doTransforms(ExecContext * ec) const
{
- BOOST_FOREACH(const Targets::value_type & t, targets) {
+ for (const Targets::value_type & t : targets) {
t.second->transform(this, t.first.get(), ec);
if (const TransformSource * tr = dynamic_cast<const TransformSource *>(t.first.get())) {
tr->doTransforms(ec);
diff --git a/project2/common/variables.cpp b/project2/common/variables.cpp
index d3e7254..a2a9004 100644
--- a/project2/common/variables.cpp
+++ b/project2/common/variables.cpp
@@ -9,7 +9,6 @@
#include "rowSet.h"
#include <stdexcept>
#include <boost/numeric/conversion/cast.hpp>
-#include <boost/foreach.hpp>
#include <boost/algorithm/string/predicate.hpp>
#include <boost/function.hpp>
#include <boost/bind.hpp>
diff --git a/project2/common/variables/literal.cpp b/project2/common/variables/literal.cpp
index 3696346..529be6e 100644
--- a/project2/common/variables/literal.cpp
+++ b/project2/common/variables/literal.cpp
@@ -1,6 +1,5 @@
#include "literal.h"
#include "../scripts.h"
-#include <boost/foreach.hpp>
#include <boost/bind.hpp>
/// Variable implementation whose value is a literal value of some known type
@@ -38,7 +37,7 @@ VariableLiteral::value(ExecContext * ec) const
return vals.front()->value(ec);
}
Glib::ustring v;
- BOOST_FOREACH(PartCPtr p, vals) {
+ for (PartCPtr p : vals) {
p->appendTo(ec, v);
}
return v;
diff --git a/project2/common/variables/lookup.cpp b/project2/common/variables/lookup.cpp
index b3f9002..c90ce46 100644
--- a/project2/common/variables/lookup.cpp
+++ b/project2/common/variables/lookup.cpp
@@ -4,7 +4,6 @@
#include "../logger.h"
#include "../rowProcessor.h"
#include "../rowSet.h"
-#include <boost/foreach.hpp>
#include "../scriptLoader.h"
#include "../scriptStorage.h"
@@ -44,7 +43,7 @@ class VariableLookup : public VariableImplDyn, public RowProcessor {
}
Key k;
k.reserve(parameters.size());
- BOOST_FOREACH(const Parameters::value_type & p, parameters) {
+ for (const Parameters::value_type & p : parameters) {
k.push_back(p.second(ec));
}
return safeMapLookup<NotFound>(map, k);
@@ -52,7 +51,7 @@ class VariableLookup : public VariableImplDyn, public RowProcessor {
private:
void fillCache(ExecContext * ec) const
{
- BOOST_FOREACH(const RowSets::value_type & rs, rowSets) {
+ for (const RowSets::value_type & rs : rowSets) {
rs->execute(filter, boost::bind(&VariableLookup::rowReady, this, _1, ec), ec);
}
Logger()->messagef(LOG_DEBUG, "%s: %s has filled cached with %zu items",
@@ -61,7 +60,7 @@ class VariableLookup : public VariableImplDyn, public RowProcessor {
void rowReady(const RowState * rs, ExecContext * ec) const
{
Key k;
- BOOST_FOREACH(const Parameters::value_type & p, parameters) {
+ for (const Parameters::value_type & p : parameters) {
k.push_back(rs->getCurrentValue(ec, p.first));
}
map[k] = rs->getCurrentValue(ec, name);
diff --git a/project2/common/viewHost.cpp b/project2/common/viewHost.cpp
index 320e86d..ce99506 100644
--- a/project2/common/viewHost.cpp
+++ b/project2/common/viewHost.cpp
@@ -2,7 +2,6 @@
#include "viewHost.h"
#include "commonObjects.h"
#include "transform.h"
-#include <boost/foreach.hpp>
#include <iostream>
ViewHost::ViewHost(ScriptNodePtr s) :
@@ -23,11 +22,11 @@ ViewHost::executeViews(ExecContext * ec) const
MultiRowSetPresenterPtr presenter = getPresenter(ec);
presenter->init(ec);
- BOOST_FOREACH(const Views::value_type & s, views) {
+ for (const Views::value_type & s : views) {
s->execute(presenter.get(), ec);
}
// Caches might open transactions
- BOOST_FOREACH(const CommonObjects::DataSources::value_type & ds, CommonObjects::datasources) {
+ for (const CommonObjects::DataSources::value_type & ds : CommonObjects::datasources) {
ds.second->commit();
}
presenter->finalizeContent();
diff --git a/project2/files/optionsSource.cpp b/project2/files/optionsSource.cpp
index 7c2dd2b..c09132a 100644
--- a/project2/files/optionsSource.cpp
+++ b/project2/files/optionsSource.cpp
@@ -77,7 +77,7 @@ DECLARE_OPTIONS(FileOptions, "File Options options")
OptionsSources::Add(vt, fo);
},
[]() {
- BOOST_FOREACH(const auto & fo, extraFileOptions) {
+ for (const auto & fo : extraFileOptions) {
OptionsSources::Remove(fo.first);
}
extraFileOptions.clear();
diff --git a/project2/ice/iceBase.cpp b/project2/ice/iceBase.cpp
index aaabad6..7a3382c 100644
--- a/project2/ice/iceBase.cpp
+++ b/project2/ice/iceBase.cpp
@@ -34,7 +34,7 @@ class WaitAndLoad : public boost::static_visitor<> {
void
IceBase::FinaliseLoad(Libs & libs)
{
- BOOST_FOREACH(auto & lib, libs) {
+ for (auto & lib : libs) {
boost::apply_visitor(WaitAndLoad(lib), lib);
}
}
diff --git a/project2/ice/iceCompile.cpp b/project2/ice/iceCompile.cpp
index b7d53c1..a518cde 100644
--- a/project2/ice/iceCompile.cpp
+++ b/project2/ice/iceCompile.cpp
@@ -61,7 +61,7 @@ void
IceCompile::Update(int steps)
{
fs::create_directories(IceCompile::tmpdir);
- BOOST_FOREACH(const auto & dep, deps) {
+ for (const auto & dep : deps) {
dep->Update(steps);
}
const fs::path cpp(tmpdir / OutputName(".cpp"));
@@ -133,7 +133,7 @@ IceCompile::LibHandles
IceCompile::Open() const
{
LibHandles rtn;
- BOOST_FOREACH(const auto & dep, deps) {
+ for (const auto & dep : deps) {
rtn.insert(dep->OpenLib());
}
rtn.insert(OpenLib());
diff --git a/project2/streams/streamNvpRows.cpp b/project2/streams/streamNvpRows.cpp
index 3f5927f..02d1adc 100644
--- a/project2/streams/streamNvpRows.cpp
+++ b/project2/streams/streamNvpRows.cpp
@@ -71,7 +71,7 @@ class StreamNvpRows : public RowSet {
}
else {
if (tok.length() >= tokens.begin()->chars.length()) {
- BOOST_FOREACH(auto & t, tokens) {
+ for (auto & t : tokens) {
t.firstMatch = tok.rfind(t.chars);
if (t.firstMatch < tok.length() - tokens.begin()->chars.length()) {
t.firstMatch = -1;
@@ -176,7 +176,6 @@ class StreamNvpRows : public RowSet {
const Glib::ustring newline;
const Glib::ustring assign;
const std::string encoding;
- bool convertRequired;
};
DECLARE_LOADER("streamnvprows", StreamNvpRows);
diff --git a/project2/ut/testOptionsSource.cpp b/project2/ut/testOptionsSource.cpp
index 41a05fd..23e21d0 100644
--- a/project2/ut/testOptionsSource.cpp
+++ b/project2/ut/testOptionsSource.cpp
@@ -11,7 +11,7 @@ TestOptionsSource::TestOptionsSource(const Opts & o) :
void
TestOptionsSource::loadInto(const ConfigConsumer & consume, const Options::CurrentPlatform & platform) const
{
- BOOST_FOREACH(const auto & opt, opts) {
+ for (const auto & opt : opts) {
consume(opt.first, testPlatform, opt.second, platform);
}
}
diff --git a/project2/ut/testScriptHost.cpp b/project2/ut/testScriptHost.cpp
index 4dabd39..7d456b9 100644
--- a/project2/ut/testScriptHost.cpp
+++ b/project2/ut/testScriptHost.cpp
@@ -114,7 +114,7 @@ namespace std {
std::ostream &
operator<<(std::ostream & s, const PresenterData & v)
{
- BOOST_FOREACH(const auto & e, v) {
+ for (const auto & e : v) {
s << "[" << e << "]" << std::endl;
}
return s;