1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Removed most of non-const static fields in lib. Reduced header includes.

This commit is contained in:
Ivan Savenko
2024-01-09 16:43:36 +02:00
parent a15366f5a5
commit e67e4430ba
49 changed files with 139 additions and 116 deletions

View File

@@ -68,16 +68,6 @@ public:
}
}
_Object * getObjectWriteable(const int32_t index)
{
if(index < 0 || index >= objects.size())
{
logMod->error("%s id %d is invalid", getTypeNames()[0], index);
throw std::runtime_error("Attempt to access invalid index " + std::to_string(index) + " of type " + getTypeNames().front());
}
return objects[index].get();
}
const Entity * getBaseByIndex(const int32_t index) const override
{
return getObjectImpl(index);