1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00

Merge branch 'develop' of https://github.com/vcmi/vcmi into develop

This commit is contained in:
DjWarmonger 2016-11-25 19:54:44 +01:00
commit 4789262200
2 changed files with 6 additions and 6 deletions

View File

@ -18,6 +18,8 @@
CObstacleInstance::CObstacleInstance()
{
obstacleType = USUAL;
uniqueID = -1;
ID = -1;
}
CObstacleInstance::~CObstacleInstance()
@ -33,12 +35,9 @@ const CObstacleInfo & CObstacleInstance::getInfo() const
return VLC->heroh->absoluteObstacles[ID];
case USUAL:
return VLC->heroh->obstacles[ID];
case MOAT:
assert(0);
default:
assert(0);
throw std::runtime_error("Unknown obstacle type in CObstacleInstance::getInfo()");
}
throw std::runtime_error("Unknown obstacle type in CObstacleInstance::getInfo()");
}
std::vector<BattleHex> CObstacleInstance::getBlockedTiles() const

View File

@ -42,7 +42,8 @@ void CFilesystemGenerator::loadConfig(const JsonNode & config)
logGlobal->debugStream() << "\t\tLoading resource at " << prefix + entry["path"].String();
auto map = genFunctorMap();
auto functor = map.find(entry["type"].String());
auto typeName = entry["type"].String();
auto functor = map.find(typeName);
if (functor != map.end())
{
@ -51,7 +52,7 @@ void CFilesystemGenerator::loadConfig(const JsonNode & config)
}
else
{
logGlobal->errorStream() << "Unknown filesystem format: " << functor->first;
logGlobal->error("Unknown filesystem format: %s", typeName);
}
}
}