1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported

- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
This commit is contained in:
Ivan Savenko
2013-06-29 13:05:48 +00:00
parent 262f956a16
commit f82122d9be
88 changed files with 2065 additions and 2062 deletions

View File

@ -89,7 +89,7 @@ namespace ERMPrinter
if(id.is_initialized())
{
logGlobal->debugStream() << "identifier: ";
BOOST_FOREACH(TIdentifierInternal x, id.get())
for (auto x : id.get())
{
logGlobal->debugStream() << "#";
boost::apply_visitor(IdentifierPrinterVisitor(), x);
@ -215,7 +215,7 @@ namespace ERMPrinter
void operator()(TNormalBodyOption const& cmp) const
{
logGlobal->debugStream() << cmp.optionCode << "~";
BOOST_FOREACH(TBodyOptionItem optList, cmp.params)
for (auto optList : cmp.params)
{
boost::apply_visitor(BodyOptionItemPrinterVisitor(), optList);
}
@ -225,7 +225,7 @@ namespace ERMPrinter
void bodyPrinter(const Tbody & body)
{
logGlobal->debugStream() << " body items: ";
BOOST_FOREACH(TBodyOption bi, body)
for (auto bi: body)
{
logGlobal->debugStream() << " (";
apply_visitor(BodyOptionVisitor(), bi);
@ -299,7 +299,7 @@ namespace ERMPrinter
}
void operator()(TSymbol const& cmd) const
{
BOOST_FOREACH(TVModifier mod, cmd.symModifier)
for(auto mod : cmd.symModifier)
{
logGlobal->debugStream() << mod << " ";
}
@ -329,12 +329,12 @@ namespace ERMPrinter
void printTVExp(const TVExp & exp)
{
BOOST_FOREACH(TVModifier mod, exp.modifier)
for (auto mod: exp.modifier)
{
logGlobal->debugStream() << mod << " ";
}
logGlobal->debugStream() << "[ ";
BOOST_FOREACH(TVOption opt, exp.children)
for (auto opt: exp.children)
{
boost::apply_visitor(VOptionPrinterVisitor(), opt);
logGlobal->debugStream() << " ";