Revert "Project modernization (#630)"
This code was not tested and breaks in Release builds, reverting to restore
functionality of the nightly. All in-game menus do not work and generating
a world crashes.
This reverts commit a9be52c41a.
This commit is contained in:
@@ -62,7 +62,7 @@ void ModifiableAttributeInstance::getModifiers(unordered_set<AttributeModifier *
|
||||
|
||||
AttributeModifier *ModifiableAttributeInstance::getModifier(eMODIFIER_ID id)
|
||||
{
|
||||
AttributeModifier *modifier = nullptr;
|
||||
AttributeModifier *modifier = NULL;
|
||||
|
||||
auto it = modifierById.find(id);
|
||||
if(it != modifierById.end())
|
||||
@@ -85,7 +85,7 @@ void ModifiableAttributeInstance::addModifiers(unordered_set<AttributeModifier *
|
||||
void ModifiableAttributeInstance::addModifier(AttributeModifier *modifier)
|
||||
{
|
||||
// Can't add modifiers with the same ID (unless the modifier is anonymous)
|
||||
if (modifier->getId() != eModifierId_ANONYMOUS && getModifier(modifier->getId()) != nullptr)
|
||||
if (modifier->getId() != eModifierId_ANONYMOUS && getModifier(modifier->getId()) != NULL)
|
||||
{
|
||||
assert(0);
|
||||
// throw new IllegalArgumentException("Modifier is already applied on this attribute!");
|
||||
@@ -126,7 +126,7 @@ void ModifiableAttributeInstance::removeModifier(AttributeModifier *modifier)
|
||||
void ModifiableAttributeInstance::removeModifier(eMODIFIER_ID id)
|
||||
{
|
||||
AttributeModifier *modifier = getModifier(id);
|
||||
if (modifier != nullptr) removeModifier(modifier);
|
||||
if (modifier != NULL) removeModifier(modifier);
|
||||
}
|
||||
|
||||
void ModifiableAttributeInstance::removeModifiers()
|
||||
|
||||
Reference in New Issue
Block a user