1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-12-07 23:33:15 +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

@@ -5,7 +5,7 @@
CMappedFileLoader::CMappedFileLoader(const JsonNode &config)
{
BOOST_FOREACH(auto entry, config.Struct())
for(auto entry : config.Struct())
{
fileList[ResourceID(entry.first)] = entry.second.String();
}
@@ -18,9 +18,9 @@ std::unique_ptr<CInputStream> CMappedFileLoader::load(const std::string & resour
bool CMappedFileLoader::existsEntry(const std::string & resourceName) const
{
for(auto it = fileList.begin(); it != fileList.end(); ++it)
for(auto & elem : fileList)
{
if(it->second == resourceName)
if(elem.second == resourceName)
{
return true;
}
@@ -29,7 +29,7 @@ bool CMappedFileLoader::existsEntry(const std::string & resourceName) const
return false;
}
boost::unordered_map<ResourceID, std::string> CMappedFileLoader::getEntries() const
std::unordered_map<ResourceID, std::string> CMappedFileLoader::getEntries() const
{
return fileList;
}