mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-17 00:07:41 +02:00
Apply suggestions from code review
Co-authored-by: Nordsoft91 <nordsoft@yahoo.com>
This commit is contained in:
@ -194,9 +194,9 @@ TObjectTypeHandler CObjectClassesHandler::loadSubObjectFromJson(const std::strin
|
|||||||
assert(!scope.empty());
|
assert(!scope.empty());
|
||||||
|
|
||||||
std::string handler = obj->handlerName;
|
std::string handler = obj->handlerName;
|
||||||
if(!handlerConstructors.count(obj->handlerName))
|
if(!handlerConstructors.count(handler))
|
||||||
{
|
{
|
||||||
logMod->error("Handler with name %s was not found!", obj->handlerName);
|
logMod->error("Handler with name %s was not found!", handler);
|
||||||
// workaround for potential crash - if handler does not exists, continue with generic handler that is used for objects without any custom logc
|
// workaround for potential crash - if handler does not exists, continue with generic handler that is used for objects without any custom logc
|
||||||
handler = "generic";
|
handler = "generic";
|
||||||
assert(handlerConstructors.count(handler) != 0);
|
assert(handlerConstructors.count(handler) != 0);
|
||||||
|
Reference in New Issue
Block a user