mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-10-11 01:13:02 -04:00
newer standards prefer nullptr over NULL - this is most of them but there are others too
This commit is contained in:
@@ -45,7 +45,7 @@ ServerArmorTemplate::~ServerArmorTemplate()
|
||||
for (iter = m_specialProtection.begin(); iter != m_specialProtection.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_specialProtection.clear();
|
||||
}
|
||||
@@ -97,10 +97,10 @@ Tag ServerArmorTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerArmorTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerArmorTemplate * base = dynamic_cast<const ServerArmorTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerArmorTemplate::getHighestTemplateVersion
|
||||
@@ -114,9 +114,9 @@ CompilerIntegerParam * ServerArmorTemplate::getCompilerIntegerParam(const char *
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_rating;
|
||||
}
|
||||
@@ -128,9 +128,9 @@ CompilerIntegerParam * ServerArmorTemplate::getCompilerIntegerParam(const char *
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_integrity;
|
||||
}
|
||||
@@ -142,9 +142,9 @@ CompilerIntegerParam * ServerArmorTemplate::getCompilerIntegerParam(const char *
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_effectiveness;
|
||||
}
|
||||
@@ -156,9 +156,9 @@ CompilerIntegerParam * ServerArmorTemplate::getCompilerIntegerParam(const char *
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_vulnerability;
|
||||
}
|
||||
@@ -170,9 +170,9 @@ CompilerIntegerParam * ServerArmorTemplate::getCompilerIntegerParam(const char *
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_encumbrance[index];
|
||||
}
|
||||
@@ -180,7 +180,7 @@ CompilerIntegerParam * ServerArmorTemplate::getCompilerIntegerParam(const char *
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerArmorTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerArmorTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -229,7 +229,7 @@ StructParamOT * ServerArmorTemplate::getStructParamOT(const char *name, bool dee
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerArmorTemplate::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * ServerArmorTemplate::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
@@ -316,12 +316,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
@@ -355,7 +355,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_specialProtection.begin(); iter != m_specialProtection.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_specialProtection.clear();
|
||||
m_specialProtectionAppend = file.read_bool8();
|
||||
@@ -532,9 +532,9 @@ CompilerIntegerParam * ServerArmorTemplate::_SpecialProtection::getCompilerInteg
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_type;
|
||||
}
|
||||
@@ -546,9 +546,9 @@ CompilerIntegerParam * ServerArmorTemplate::_SpecialProtection::getCompilerInteg
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_effectiveness;
|
||||
}
|
||||
@@ -556,7 +556,7 @@ CompilerIntegerParam * ServerArmorTemplate::_SpecialProtection::getCompilerInteg
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerArmorTemplate::_SpecialProtection::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerArmorTemplate::_SpecialProtection::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerBattlefieldMarkerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerBattlefieldMarkerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerBattlefieldMarkerObjectTemplate * base = dynamic_cast<const ServerBattlefieldMarkerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerBattlefieldMarkerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+11
-11
@@ -86,10 +86,10 @@ Tag ServerBuildingObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerBuildingObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerBuildingObjectTemplate * base = dynamic_cast<const ServerBuildingObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerBuildingObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * ServerBuildingObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maintenanceCost;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ CompilerIntegerParam * ServerBuildingObjectTemplate::getCompilerIntegerParam(con
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerBuildingObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerBuildingObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -129,9 +129,9 @@ BoolParam * ServerBuildingObjectTemplate::getBoolParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_isPublic;
|
||||
}
|
||||
@@ -139,7 +139,7 @@ BoolParam * ServerBuildingObjectTemplate::getBoolParam(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerBuildingObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * ServerBuildingObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -227,12 +227,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerCellObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerCellObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerCellObjectTemplate * base = dynamic_cast<const ServerCellObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerCellObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerCityObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerCityObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerCityObjectTemplate * base = dynamic_cast<const ServerCityObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerCityObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerConstructionContractObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerConstructionContractObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerConstructionContractObjectTemplate * base = dynamic_cast<const ServerConstructionContractObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerConstructionContractObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+40
-40
@@ -45,7 +45,7 @@ ServerCreatureObjectTemplate::~ServerCreatureObjectTemplate()
|
||||
for (iter = m_attribMods.begin(); iter != m_attribMods.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_attribMods.clear();
|
||||
}
|
||||
@@ -97,10 +97,10 @@ Tag ServerCreatureObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerCreatureObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerCreatureObjectTemplate * base = dynamic_cast<const ServerCreatureObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerCreatureObjectTemplate::getHighestTemplateVersion
|
||||
@@ -114,9 +114,9 @@ CompilerIntegerParam * ServerCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_attributes[index];
|
||||
}
|
||||
@@ -128,9 +128,9 @@ CompilerIntegerParam * ServerCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_minAttributes[index];
|
||||
}
|
||||
@@ -142,9 +142,9 @@ CompilerIntegerParam * ServerCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxAttributes[index];
|
||||
}
|
||||
@@ -156,9 +156,9 @@ CompilerIntegerParam * ServerCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_shockWounds;
|
||||
}
|
||||
@@ -166,7 +166,7 @@ CompilerIntegerParam * ServerCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerCreatureObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerCreatureObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -177,9 +177,9 @@ FloatParam * ServerCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_minDrainModifier;
|
||||
}
|
||||
@@ -191,9 +191,9 @@ FloatParam * ServerCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxDrainModifier;
|
||||
}
|
||||
@@ -205,9 +205,9 @@ FloatParam * ServerCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_minFaucetModifier;
|
||||
}
|
||||
@@ -219,9 +219,9 @@ FloatParam * ServerCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxFaucetModifier;
|
||||
}
|
||||
@@ -233,9 +233,9 @@ FloatParam * ServerCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_approachTriggerRange;
|
||||
}
|
||||
@@ -247,9 +247,9 @@ FloatParam * ServerCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxMentalStates[index];
|
||||
}
|
||||
@@ -261,9 +261,9 @@ FloatParam * ServerCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_mentalStatesDecay[index];
|
||||
}
|
||||
@@ -271,7 +271,7 @@ FloatParam * ServerCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerCreatureObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * ServerCreatureObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -282,9 +282,9 @@ BoolParam * ServerCreatureObjectTemplate::getBoolParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_canCreateAvatar;
|
||||
}
|
||||
@@ -292,7 +292,7 @@ BoolParam * ServerCreatureObjectTemplate::getBoolParam(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerCreatureObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * ServerCreatureObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -303,9 +303,9 @@ StringParam * ServerCreatureObjectTemplate::getStringParam(const char *name, boo
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_defaultWeapon;
|
||||
}
|
||||
@@ -317,9 +317,9 @@ StringParam * ServerCreatureObjectTemplate::getStringParam(const char *name, boo
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_nameGeneratorType;
|
||||
}
|
||||
@@ -327,7 +327,7 @@ StringParam * ServerCreatureObjectTemplate::getStringParam(const char *name, boo
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerCreatureObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerCreatureObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -361,7 +361,7 @@ StructParamOT * ServerCreatureObjectTemplate::getStructParamOT(const char *name,
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerCreatureObjectTemplate::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * ServerCreatureObjectTemplate::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
@@ -464,12 +464,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
@@ -549,7 +549,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_attribMods.begin(); iter != m_attribMods.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_attribMods.clear();
|
||||
m_attribModsAppend = file.read_bool8();
|
||||
|
||||
+47
-47
@@ -49,7 +49,7 @@ ServerDraftSchematicObjectTemplate::~ServerDraftSchematicObjectTemplate()
|
||||
for (iter = m_slots.begin(); iter != m_slots.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_slots.clear();
|
||||
}
|
||||
@@ -58,7 +58,7 @@ ServerDraftSchematicObjectTemplate::~ServerDraftSchematicObjectTemplate()
|
||||
for (iter = m_skillCommands.begin(); iter != m_skillCommands.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_skillCommands.clear();
|
||||
}
|
||||
@@ -67,7 +67,7 @@ ServerDraftSchematicObjectTemplate::~ServerDraftSchematicObjectTemplate()
|
||||
for (iter = m_manufactureScripts.begin(); iter != m_manufactureScripts.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_manufactureScripts.clear();
|
||||
}
|
||||
@@ -119,10 +119,10 @@ Tag ServerDraftSchematicObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerDraftSchematicObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerDraftSchematicObjectTemplate * base = dynamic_cast<const ServerDraftSchematicObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerDraftSchematicObjectTemplate::getHighestTemplateVersion
|
||||
@@ -136,9 +136,9 @@ CompilerIntegerParam * ServerDraftSchematicObjectTemplate::getCompilerIntegerPar
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_category;
|
||||
}
|
||||
@@ -150,9 +150,9 @@ CompilerIntegerParam * ServerDraftSchematicObjectTemplate::getCompilerIntegerPar
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_itemsPerContainer;
|
||||
}
|
||||
@@ -160,7 +160,7 @@ CompilerIntegerParam * ServerDraftSchematicObjectTemplate::getCompilerIntegerPar
|
||||
}
|
||||
else
|
||||
return ServerIntangibleObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerDraftSchematicObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -171,9 +171,9 @@ FloatParam * ServerDraftSchematicObjectTemplate::getFloatParam(const char *name,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_manufactureTime;
|
||||
}
|
||||
@@ -185,9 +185,9 @@ FloatParam * ServerDraftSchematicObjectTemplate::getFloatParam(const char *name,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_prototypeTime;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ FloatParam * ServerDraftSchematicObjectTemplate::getFloatParam(const char *name,
|
||||
}
|
||||
else
|
||||
return ServerIntangibleObjectTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * ServerDraftSchematicObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -206,9 +206,9 @@ BoolParam * ServerDraftSchematicObjectTemplate::getBoolParam(const char *name, b
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_destroyIngredients;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ BoolParam * ServerDraftSchematicObjectTemplate::getBoolParam(const char *name, b
|
||||
}
|
||||
else
|
||||
return ServerIntangibleObjectTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * ServerDraftSchematicObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -227,9 +227,9 @@ StringParam * ServerDraftSchematicObjectTemplate::getStringParam(const char *nam
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_craftedObjectTemplate;
|
||||
}
|
||||
@@ -241,9 +241,9 @@ StringParam * ServerDraftSchematicObjectTemplate::getStringParam(const char *nam
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_crateObjectTemplate;
|
||||
}
|
||||
@@ -275,7 +275,7 @@ StringParam * ServerDraftSchematicObjectTemplate::getStringParam(const char *nam
|
||||
}
|
||||
else
|
||||
return ServerIntangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerDraftSchematicObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -309,7 +309,7 @@ StructParamOT * ServerDraftSchematicObjectTemplate::getStructParamOT(const char
|
||||
}
|
||||
else
|
||||
return ServerIntangibleObjectTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * ServerDraftSchematicObjectTemplate::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
@@ -418,12 +418,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
@@ -457,7 +457,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_slots.begin(); iter != m_slots.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_slots.clear();
|
||||
m_slotsAppend = file.read_bool8();
|
||||
@@ -476,7 +476,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_skillCommands.begin(); iter != m_skillCommands.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_skillCommands.clear();
|
||||
m_skillCommandsAppend = file.read_bool8();
|
||||
@@ -497,7 +497,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_manufactureScripts.begin(); iter != m_manufactureScripts.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_manufactureScripts.clear();
|
||||
m_manufactureScriptsAppend = file.read_bool8();
|
||||
@@ -672,7 +672,7 @@ ServerDraftSchematicObjectTemplate::_IngredientSlot::~_IngredientSlot()
|
||||
for (iter = m_options.begin(); iter != m_options.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_options.clear();
|
||||
}
|
||||
@@ -719,9 +719,9 @@ FloatParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getFloatParam(
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_complexity;
|
||||
}
|
||||
@@ -729,7 +729,7 @@ FloatParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getFloatParam(
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::_IngredientSlot::getFloatParam
|
||||
|
||||
BoolParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -740,9 +740,9 @@ BoolParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getBoolParam(co
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_optional;
|
||||
}
|
||||
@@ -750,7 +750,7 @@ BoolParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getBoolParam(co
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::_IngredientSlot::getBoolParam
|
||||
|
||||
StringParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -761,9 +761,9 @@ StringParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getStringPara
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_optionalSkillCommand;
|
||||
}
|
||||
@@ -775,9 +775,9 @@ StringParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getStringPara
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_appearance;
|
||||
}
|
||||
@@ -785,7 +785,7 @@ StringParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getStringPara
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::_IngredientSlot::getStringParam
|
||||
|
||||
StringIdParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -796,9 +796,9 @@ StringIdParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getStringId
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_name;
|
||||
}
|
||||
@@ -806,7 +806,7 @@ StringIdParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getStringId
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::_IngredientSlot::getStringIdParam
|
||||
|
||||
VectorParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getVectorParam(const char *name, bool deepCheck, int index)
|
||||
@@ -835,7 +835,7 @@ StructParamOT * ServerDraftSchematicObjectTemplate::_IngredientSlot::getStructPa
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerDraftSchematicObjectTemplate::_IngredientSlot::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * ServerDraftSchematicObjectTemplate::_IngredientSlot::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
@@ -921,7 +921,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_options.begin(); iter != m_options.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_options.clear();
|
||||
m_optionsAppend = file.read_bool8();
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerFactoryObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerFactoryObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerFactoryObjectTemplate * base = dynamic_cast<const ServerFactoryObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerFactoryObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerGroupObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerGroupObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerGroupObjectTemplate * base = dynamic_cast<const ServerGroupObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerGroupObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerGuildObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerGuildObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerGuildObjectTemplate * base = dynamic_cast<const ServerGuildObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerGuildObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+15
-15
@@ -86,10 +86,10 @@ Tag ServerHarvesterInstallationObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerHarvesterInstallationObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerHarvesterInstallationObjectTemplate * base = dynamic_cast<const ServerHarvesterInstallationObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerHarvesterInstallationObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * ServerHarvesterInstallationObjectTemplate::getCompilerInt
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxExtractionRate;
|
||||
}
|
||||
@@ -117,9 +117,9 @@ CompilerIntegerParam * ServerHarvesterInstallationObjectTemplate::getCompilerInt
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_currentExtractionRate;
|
||||
}
|
||||
@@ -131,9 +131,9 @@ CompilerIntegerParam * ServerHarvesterInstallationObjectTemplate::getCompilerInt
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxHopperSize;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ CompilerIntegerParam * ServerHarvesterInstallationObjectTemplate::getCompilerInt
|
||||
}
|
||||
else
|
||||
return ServerInstallationObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerHarvesterInstallationObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerHarvesterInstallationObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -162,9 +162,9 @@ StringParam * ServerHarvesterInstallationObjectTemplate::getStringParam(const ch
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_masterClassName;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ StringParam * ServerHarvesterInstallationObjectTemplate::getStringParam(const ch
|
||||
}
|
||||
else
|
||||
return ServerInstallationObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerHarvesterInstallationObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerHarvesterInstallationObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -255,12 +255,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerInstallationObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerInstallationObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerInstallationObjectTemplate * base = dynamic_cast<const ServerInstallationObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerInstallationObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+35
-35
@@ -86,10 +86,10 @@ Tag ServerIntangibleObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerIntangibleObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerIntangibleObjectTemplate * base = dynamic_cast<const ServerIntangibleObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerIntangibleObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * ServerIntangibleObjectTemplate::getCompilerIntegerParam(c
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_count;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ CompilerIntegerParam * ServerIntangibleObjectTemplate::getCompilerIntegerParam(c
|
||||
}
|
||||
else
|
||||
return ServerObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerIntangibleObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -211,12 +211,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
@@ -316,7 +316,7 @@ ServerIntangibleObjectTemplate::_Ingredient::~_Ingredient()
|
||||
for (iter = m_ingredients.begin(); iter != m_ingredients.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_ingredients.clear();
|
||||
}
|
||||
@@ -358,9 +358,9 @@ CompilerIntegerParam * ServerIntangibleObjectTemplate::_Ingredient::getCompilerI
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_ingredientType;
|
||||
}
|
||||
@@ -368,7 +368,7 @@ CompilerIntegerParam * ServerIntangibleObjectTemplate::_Ingredient::getCompilerI
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::_Ingredient::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerIntangibleObjectTemplate::_Ingredient::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -379,9 +379,9 @@ FloatParam * ServerIntangibleObjectTemplate::_Ingredient::getFloatParam(const ch
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_complexity;
|
||||
}
|
||||
@@ -389,7 +389,7 @@ FloatParam * ServerIntangibleObjectTemplate::_Ingredient::getFloatParam(const ch
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::_Ingredient::getFloatParam
|
||||
|
||||
BoolParam * ServerIntangibleObjectTemplate::_Ingredient::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -405,9 +405,9 @@ StringParam * ServerIntangibleObjectTemplate::_Ingredient::getStringParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_skillCommand;
|
||||
}
|
||||
@@ -415,7 +415,7 @@ StringParam * ServerIntangibleObjectTemplate::_Ingredient::getStringParam(const
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::_Ingredient::getStringParam
|
||||
|
||||
StringIdParam * ServerIntangibleObjectTemplate::_Ingredient::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -449,7 +449,7 @@ StructParamOT * ServerIntangibleObjectTemplate::_Ingredient::getStructParamOT(co
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::_Ingredient::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * ServerIntangibleObjectTemplate::_Ingredient::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
@@ -533,7 +533,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_ingredients.begin(); iter != m_ingredients.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_ingredients.clear();
|
||||
m_ingredientsAppend = file.read_bool8();
|
||||
@@ -669,9 +669,9 @@ CompilerIntegerParam * ServerIntangibleObjectTemplate::_SchematicAttribute::getC
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_value;
|
||||
}
|
||||
@@ -679,7 +679,7 @@ CompilerIntegerParam * ServerIntangibleObjectTemplate::_SchematicAttribute::getC
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::_SchematicAttribute::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerIntangibleObjectTemplate::_SchematicAttribute::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -705,9 +705,9 @@ StringIdParam * ServerIntangibleObjectTemplate::_SchematicAttribute::getStringId
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_name;
|
||||
}
|
||||
@@ -715,7 +715,7 @@ StringIdParam * ServerIntangibleObjectTemplate::_SchematicAttribute::getStringId
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::_SchematicAttribute::getStringIdParam
|
||||
|
||||
VectorParam * ServerIntangibleObjectTemplate::_SchematicAttribute::getVectorParam(const char *name, bool deepCheck, int index)
|
||||
@@ -889,9 +889,9 @@ CompilerIntegerParam * ServerIntangibleObjectTemplate::_SimpleIngredient::getCom
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_count;
|
||||
}
|
||||
@@ -899,7 +899,7 @@ CompilerIntegerParam * ServerIntangibleObjectTemplate::_SimpleIngredient::getCom
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::_SimpleIngredient::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerIntangibleObjectTemplate::_SimpleIngredient::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -920,9 +920,9 @@ StringParam * ServerIntangibleObjectTemplate::_SimpleIngredient::getStringParam(
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_ingredient;
|
||||
}
|
||||
@@ -930,7 +930,7 @@ StringParam * ServerIntangibleObjectTemplate::_SimpleIngredient::getStringParam(
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::_SimpleIngredient::getStringParam
|
||||
|
||||
StringIdParam * ServerIntangibleObjectTemplate::_SimpleIngredient::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -941,9 +941,9 @@ StringIdParam * ServerIntangibleObjectTemplate::_SimpleIngredient::getStringIdPa
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_name;
|
||||
}
|
||||
@@ -951,7 +951,7 @@ StringIdParam * ServerIntangibleObjectTemplate::_SimpleIngredient::getStringIdPa
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerIntangibleObjectTemplate::_SimpleIngredient::getStringIdParam
|
||||
|
||||
VectorParam * ServerIntangibleObjectTemplate::_SimpleIngredient::getVectorParam(const char *name, bool deepCheck, int index)
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerJediManagerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerJediManagerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerJediManagerObjectTemplate * base = dynamic_cast<const ServerJediManagerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerJediManagerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerManufactureInstallationObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerManufactureInstallationObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerManufactureInstallationObjectTemplate * base = dynamic_cast<const ServerManufactureInstallationObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerManufactureInstallationObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+24
-24
@@ -47,7 +47,7 @@ ServerManufactureSchematicObjectTemplate::~ServerManufactureSchematicObjectTempl
|
||||
for (iter = m_ingredients.begin(); iter != m_ingredients.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_ingredients.clear();
|
||||
}
|
||||
@@ -56,7 +56,7 @@ ServerManufactureSchematicObjectTemplate::~ServerManufactureSchematicObjectTempl
|
||||
for (iter = m_attributes.begin(); iter != m_attributes.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_attributes.clear();
|
||||
}
|
||||
@@ -108,10 +108,10 @@ Tag ServerManufactureSchematicObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerManufactureSchematicObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerManufactureSchematicObjectTemplate * base = dynamic_cast<const ServerManufactureSchematicObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerManufactureSchematicObjectTemplate::getHighestTemplateVersion
|
||||
@@ -125,9 +125,9 @@ CompilerIntegerParam * ServerManufactureSchematicObjectTemplate::getCompilerInte
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_itemCount;
|
||||
}
|
||||
@@ -135,7 +135,7 @@ CompilerIntegerParam * ServerManufactureSchematicObjectTemplate::getCompilerInte
|
||||
}
|
||||
else
|
||||
return ServerIntangibleObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerManufactureSchematicObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerManufactureSchematicObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -156,9 +156,9 @@ StringParam * ServerManufactureSchematicObjectTemplate::getStringParam(const cha
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_draftSchematic;
|
||||
}
|
||||
@@ -170,9 +170,9 @@ StringParam * ServerManufactureSchematicObjectTemplate::getStringParam(const cha
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_creator;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ StringParam * ServerManufactureSchematicObjectTemplate::getStringParam(const cha
|
||||
}
|
||||
else
|
||||
return ServerIntangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerManufactureSchematicObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerManufactureSchematicObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -226,7 +226,7 @@ StructParamOT * ServerManufactureSchematicObjectTemplate::getStructParamOT(const
|
||||
}
|
||||
else
|
||||
return ServerIntangibleObjectTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerManufactureSchematicObjectTemplate::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * ServerManufactureSchematicObjectTemplate::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
@@ -324,12 +324,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
@@ -361,7 +361,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_ingredients.begin(); iter != m_ingredients.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_ingredients.clear();
|
||||
m_ingredientsAppend = file.read_bool8();
|
||||
@@ -382,7 +382,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_attributes.begin(); iter != m_attributes.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_attributes.clear();
|
||||
m_attributesAppend = file.read_bool8();
|
||||
@@ -563,9 +563,9 @@ StringIdParam * ServerManufactureSchematicObjectTemplate::_IngredientSlot::getSt
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_name;
|
||||
}
|
||||
@@ -573,7 +573,7 @@ StringIdParam * ServerManufactureSchematicObjectTemplate::_IngredientSlot::getSt
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerManufactureSchematicObjectTemplate::_IngredientSlot::getStringIdParam
|
||||
|
||||
VectorParam * ServerManufactureSchematicObjectTemplate::_IngredientSlot::getVectorParam(const char *name, bool deepCheck, int index)
|
||||
@@ -594,9 +594,9 @@ StructParamOT * ServerManufactureSchematicObjectTemplate::_IngredientSlot::getSt
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_ingredient;
|
||||
}
|
||||
@@ -604,7 +604,7 @@ StructParamOT * ServerManufactureSchematicObjectTemplate::_IngredientSlot::getSt
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerManufactureSchematicObjectTemplate::_IngredientSlot::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * ServerManufactureSchematicObjectTemplate::_IngredientSlot::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerMissionObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerMissionObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerMissionObjectTemplate * base = dynamic_cast<const ServerMissionObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerMissionObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ ServerObjectTemplate::~ServerObjectTemplate()
|
||||
for (iter = m_scripts.begin(); iter != m_scripts.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_scripts.clear();
|
||||
}
|
||||
@@ -64,7 +64,7 @@ ServerObjectTemplate::~ServerObjectTemplate()
|
||||
for (iter = m_visibleFlags.begin(); iter != m_visibleFlags.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_visibleFlags.clear();
|
||||
}
|
||||
@@ -73,7 +73,7 @@ ServerObjectTemplate::~ServerObjectTemplate()
|
||||
for (iter = m_deleteFlags.begin(); iter != m_deleteFlags.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_deleteFlags.clear();
|
||||
}
|
||||
@@ -82,7 +82,7 @@ ServerObjectTemplate::~ServerObjectTemplate()
|
||||
for (iter = m_moveFlags.begin(); iter != m_moveFlags.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_moveFlags.clear();
|
||||
}
|
||||
@@ -91,7 +91,7 @@ ServerObjectTemplate::~ServerObjectTemplate()
|
||||
for (iter = m_contents.begin(); iter != m_contents.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_contents.clear();
|
||||
}
|
||||
@@ -100,7 +100,7 @@ ServerObjectTemplate::~ServerObjectTemplate()
|
||||
for (iter = m_xpPoints.begin(); iter != m_xpPoints.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_xpPoints.clear();
|
||||
}
|
||||
@@ -152,10 +152,10 @@ Tag ServerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerObjectTemplate * base = dynamic_cast<const ServerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -169,9 +169,9 @@ CompilerIntegerParam * ServerObjectTemplate::getCompilerIntegerParam(const char
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_volume;
|
||||
}
|
||||
@@ -219,9 +219,9 @@ CompilerIntegerParam * ServerObjectTemplate::getCompilerIntegerParam(const char
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_tintIndex;
|
||||
}
|
||||
@@ -229,7 +229,7 @@ CompilerIntegerParam * ServerObjectTemplate::getCompilerIntegerParam(const char
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -240,9 +240,9 @@ FloatParam * ServerObjectTemplate::getFloatParam(const char *name, bool deepChec
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_complexity;
|
||||
}
|
||||
@@ -254,9 +254,9 @@ FloatParam * ServerObjectTemplate::getFloatParam(const char *name, bool deepChec
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_updateRanges[index];
|
||||
}
|
||||
@@ -264,7 +264,7 @@ FloatParam * ServerObjectTemplate::getFloatParam(const char *name, bool deepChec
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * ServerObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -275,9 +275,9 @@ BoolParam * ServerObjectTemplate::getBoolParam(const char *name, bool deepCheck,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_invulnerable;
|
||||
}
|
||||
@@ -289,9 +289,9 @@ BoolParam * ServerObjectTemplate::getBoolParam(const char *name, bool deepCheck,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_persistByDefault;
|
||||
}
|
||||
@@ -303,9 +303,9 @@ BoolParam * ServerObjectTemplate::getBoolParam(const char *name, bool deepCheck,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_persistContents;
|
||||
}
|
||||
@@ -313,7 +313,7 @@ BoolParam * ServerObjectTemplate::getBoolParam(const char *name, bool deepCheck,
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * ServerObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -324,9 +324,9 @@ StringParam * ServerObjectTemplate::getStringParam(const char *name, bool deepCh
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_sharedTemplate;
|
||||
}
|
||||
@@ -346,7 +346,7 @@ StringParam * ServerObjectTemplate::getStringParam(const char *name, bool deepCh
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -367,9 +367,9 @@ DynamicVariableParam * ServerObjectTemplate::getDynamicVariableParam(const char
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getDynamicVariableParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_objvars;
|
||||
}
|
||||
@@ -377,7 +377,7 @@ DynamicVariableParam * ServerObjectTemplate::getDynamicVariableParam(const char
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getDynamicVariableParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::getDynamicVariableParam
|
||||
|
||||
StructParamOT * ServerObjectTemplate::getStructParamOT(const char *name, bool deepCheck, int index)
|
||||
@@ -408,7 +408,7 @@ StructParamOT * ServerObjectTemplate::getStructParamOT(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * ServerObjectTemplate::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
@@ -562,12 +562,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
@@ -597,7 +597,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_scripts.begin(); iter != m_scripts.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_scripts.clear();
|
||||
m_scriptsAppend = file.read_bool8();
|
||||
@@ -620,7 +620,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_visibleFlags.begin(); iter != m_visibleFlags.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_visibleFlags.clear();
|
||||
m_visibleFlagsAppend = file.read_bool8();
|
||||
@@ -639,7 +639,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_deleteFlags.begin(); iter != m_deleteFlags.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_deleteFlags.clear();
|
||||
m_deleteFlagsAppend = file.read_bool8();
|
||||
@@ -658,7 +658,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_moveFlags.begin(); iter != m_moveFlags.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_moveFlags.clear();
|
||||
m_moveFlagsAppend = file.read_bool8();
|
||||
@@ -697,7 +697,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_contents.begin(); iter != m_contents.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_contents.clear();
|
||||
m_contentsAppend = file.read_bool8();
|
||||
@@ -716,7 +716,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_xpPoints.begin(); iter != m_xpPoints.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_xpPoints.clear();
|
||||
m_xpPointsAppend = file.read_bool8();
|
||||
@@ -980,9 +980,9 @@ CompilerIntegerParam * ServerObjectTemplate::_AttribMod::getCompilerIntegerParam
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_target;
|
||||
}
|
||||
@@ -994,9 +994,9 @@ CompilerIntegerParam * ServerObjectTemplate::_AttribMod::getCompilerIntegerParam
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_value;
|
||||
}
|
||||
@@ -1004,7 +1004,7 @@ CompilerIntegerParam * ServerObjectTemplate::_AttribMod::getCompilerIntegerParam
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::_AttribMod::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerObjectTemplate::_AttribMod::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1015,9 +1015,9 @@ FloatParam * ServerObjectTemplate::_AttribMod::getFloatParam(const char *name, b
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_time;
|
||||
}
|
||||
@@ -1029,9 +1029,9 @@ FloatParam * ServerObjectTemplate::_AttribMod::getFloatParam(const char *name, b
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_timeAtValue;
|
||||
}
|
||||
@@ -1043,9 +1043,9 @@ FloatParam * ServerObjectTemplate::_AttribMod::getFloatParam(const char *name, b
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_decay;
|
||||
}
|
||||
@@ -1053,7 +1053,7 @@ FloatParam * ServerObjectTemplate::_AttribMod::getFloatParam(const char *name, b
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::_AttribMod::getFloatParam
|
||||
|
||||
BoolParam * ServerObjectTemplate::_AttribMod::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1276,9 +1276,9 @@ BoolParam * ServerObjectTemplate::_Contents::getBoolParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_equipObject;
|
||||
}
|
||||
@@ -1286,7 +1286,7 @@ BoolParam * ServerObjectTemplate::_Contents::getBoolParam(const char *name, bool
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::_Contents::getBoolParam
|
||||
|
||||
StringParam * ServerObjectTemplate::_Contents::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1297,9 +1297,9 @@ StringParam * ServerObjectTemplate::_Contents::getStringParam(const char *name,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_slotName;
|
||||
}
|
||||
@@ -1311,9 +1311,9 @@ StringParam * ServerObjectTemplate::_Contents::getStringParam(const char *name,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_content;
|
||||
}
|
||||
@@ -1321,7 +1321,7 @@ StringParam * ServerObjectTemplate::_Contents::getStringParam(const char *name,
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::_Contents::getStringParam
|
||||
|
||||
StringIdParam * ServerObjectTemplate::_Contents::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1508,9 +1508,9 @@ CompilerIntegerParam * ServerObjectTemplate::_MentalStateMod::getCompilerInteger
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_target;
|
||||
}
|
||||
@@ -1518,7 +1518,7 @@ CompilerIntegerParam * ServerObjectTemplate::_MentalStateMod::getCompilerInteger
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::_MentalStateMod::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerObjectTemplate::_MentalStateMod::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1529,9 +1529,9 @@ FloatParam * ServerObjectTemplate::_MentalStateMod::getFloatParam(const char *na
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_value;
|
||||
}
|
||||
@@ -1543,9 +1543,9 @@ FloatParam * ServerObjectTemplate::_MentalStateMod::getFloatParam(const char *na
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_time;
|
||||
}
|
||||
@@ -1557,9 +1557,9 @@ FloatParam * ServerObjectTemplate::_MentalStateMod::getFloatParam(const char *na
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_timeAtValue;
|
||||
}
|
||||
@@ -1571,9 +1571,9 @@ FloatParam * ServerObjectTemplate::_MentalStateMod::getFloatParam(const char *na
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_decay;
|
||||
}
|
||||
@@ -1581,7 +1581,7 @@ FloatParam * ServerObjectTemplate::_MentalStateMod::getFloatParam(const char *na
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::_MentalStateMod::getFloatParam
|
||||
|
||||
BoolParam * ServerObjectTemplate::_MentalStateMod::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1794,9 +1794,9 @@ CompilerIntegerParam * ServerObjectTemplate::_Xp::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_type;
|
||||
}
|
||||
@@ -1808,9 +1808,9 @@ CompilerIntegerParam * ServerObjectTemplate::_Xp::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_level;
|
||||
}
|
||||
@@ -1822,9 +1822,9 @@ CompilerIntegerParam * ServerObjectTemplate::_Xp::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_value;
|
||||
}
|
||||
@@ -1832,7 +1832,7 @@ CompilerIntegerParam * ServerObjectTemplate::_Xp::getCompilerIntegerParam(const
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerObjectTemplate::_Xp::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerObjectTemplate::_Xp::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
|
||||
+8
-8
@@ -86,10 +86,10 @@ Tag ServerPlanetObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerPlanetObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerPlanetObjectTemplate * base = dynamic_cast<const ServerPlanetObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerPlanetObjectTemplate::getHighestTemplateVersion
|
||||
@@ -118,9 +118,9 @@ StringParam * ServerPlanetObjectTemplate::getStringParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_planetName;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ StringParam * ServerPlanetObjectTemplate::getStringParam(const char *name, bool
|
||||
}
|
||||
else
|
||||
return ServerUniverseObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerPlanetObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerPlanetObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -211,12 +211,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerPlayerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerPlayerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerPlayerObjectTemplate * base = dynamic_cast<const ServerPlayerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerPlayerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerPlayerQuestObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerPlayerQuestObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerPlayerQuestObjectTemplate * base = dynamic_cast<const ServerPlayerQuestObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerPlayerQuestObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+17
-17
@@ -86,10 +86,10 @@ Tag ServerResourceClassObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerResourceClassObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerResourceClassObjectTemplate * base = dynamic_cast<const ServerResourceClassObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerResourceClassObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * ServerResourceClassObjectTemplate::getCompilerIntegerPara
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_numTypes;
|
||||
}
|
||||
@@ -117,9 +117,9 @@ CompilerIntegerParam * ServerResourceClassObjectTemplate::getCompilerIntegerPara
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_minTypes;
|
||||
}
|
||||
@@ -131,9 +131,9 @@ CompilerIntegerParam * ServerResourceClassObjectTemplate::getCompilerIntegerPara
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxTypes;
|
||||
}
|
||||
@@ -141,7 +141,7 @@ CompilerIntegerParam * ServerResourceClassObjectTemplate::getCompilerIntegerPara
|
||||
}
|
||||
else
|
||||
return ServerUniverseObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerResourceClassObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerResourceClassObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -162,9 +162,9 @@ StringParam * ServerResourceClassObjectTemplate::getStringParam(const char *name
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_resourceClassName;
|
||||
}
|
||||
@@ -176,9 +176,9 @@ StringParam * ServerResourceClassObjectTemplate::getStringParam(const char *name
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_parentClass;
|
||||
}
|
||||
@@ -186,7 +186,7 @@ StringParam * ServerResourceClassObjectTemplate::getStringParam(const char *name
|
||||
}
|
||||
else
|
||||
return ServerUniverseObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerResourceClassObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerResourceClassObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -269,12 +269,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+8
-8
@@ -86,10 +86,10 @@ Tag ServerResourceContainerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerResourceContainerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerResourceContainerObjectTemplate * base = dynamic_cast<const ServerResourceContainerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerResourceContainerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * ServerResourceContainerObjectTemplate::getCompilerInteger
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxResources;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ CompilerIntegerParam * ServerResourceContainerObjectTemplate::getCompilerInteger
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerResourceContainerObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerResourceContainerObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -211,12 +211,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+10
-10
@@ -86,10 +86,10 @@ Tag ServerResourcePoolObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerResourcePoolObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerResourcePoolObjectTemplate * base = dynamic_cast<const ServerResourcePoolObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerResourcePoolObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * ServerResourcePoolObjectTemplate::getCompilerIntegerParam
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_mapSeed;
|
||||
}
|
||||
@@ -117,9 +117,9 @@ CompilerIntegerParam * ServerResourcePoolObjectTemplate::getCompilerIntegerParam
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_amountRemaining;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ CompilerIntegerParam * ServerResourcePoolObjectTemplate::getCompilerIntegerParam
|
||||
}
|
||||
else
|
||||
return ServerUniverseObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerResourcePoolObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerResourcePoolObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -225,12 +225,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+8
-8
@@ -86,10 +86,10 @@ Tag ServerResourceTypeObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerResourceTypeObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerResourceTypeObjectTemplate * base = dynamic_cast<const ServerResourceTypeObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerResourceTypeObjectTemplate::getHighestTemplateVersion
|
||||
@@ -118,9 +118,9 @@ StringParam * ServerResourceTypeObjectTemplate::getStringParam(const char *name,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_resourceName;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ StringParam * ServerResourceTypeObjectTemplate::getStringParam(const char *name,
|
||||
}
|
||||
else
|
||||
return ServerUniverseObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerResourceTypeObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerResourceTypeObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -211,12 +211,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+8
-8
@@ -86,10 +86,10 @@ Tag ServerShipObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerShipObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerShipObjectTemplate * base = dynamic_cast<const ServerShipObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerShipObjectTemplate::getHighestTemplateVersion
|
||||
@@ -118,9 +118,9 @@ StringParam * ServerShipObjectTemplate::getStringParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_shipType;
|
||||
}
|
||||
@@ -128,7 +128,7 @@ StringParam * ServerShipObjectTemplate::getStringParam(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerShipObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerShipObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -211,12 +211,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+8
-8
@@ -86,10 +86,10 @@ Tag ServerStaticObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerStaticObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerStaticObjectTemplate * base = dynamic_cast<const ServerStaticObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerStaticObjectTemplate::getHighestTemplateVersion
|
||||
@@ -113,9 +113,9 @@ BoolParam * ServerStaticObjectTemplate::getBoolParam(const char *name, bool deep
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_clientOnlyBuildout;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ BoolParam * ServerStaticObjectTemplate::getBoolParam(const char *name, bool deep
|
||||
}
|
||||
else
|
||||
return ServerObjectTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerStaticObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * ServerStaticObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -211,12 +211,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+25
-25
@@ -45,7 +45,7 @@ ServerTangibleObjectTemplate::~ServerTangibleObjectTemplate()
|
||||
for (iter = m_triggerVolumes.begin(); iter != m_triggerVolumes.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_triggerVolumes.clear();
|
||||
}
|
||||
@@ -97,10 +97,10 @@ Tag ServerTangibleObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerTangibleObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerTangibleObjectTemplate * base = dynamic_cast<const ServerTangibleObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerTangibleObjectTemplate::getHighestTemplateVersion
|
||||
@@ -114,9 +114,9 @@ CompilerIntegerParam * ServerTangibleObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_combatSkeleton;
|
||||
}
|
||||
@@ -128,9 +128,9 @@ CompilerIntegerParam * ServerTangibleObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxHitPoints;
|
||||
}
|
||||
@@ -142,9 +142,9 @@ CompilerIntegerParam * ServerTangibleObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_interestRadius;
|
||||
}
|
||||
@@ -156,9 +156,9 @@ CompilerIntegerParam * ServerTangibleObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_count;
|
||||
}
|
||||
@@ -170,9 +170,9 @@ CompilerIntegerParam * ServerTangibleObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_condition;
|
||||
}
|
||||
@@ -180,7 +180,7 @@ CompilerIntegerParam * ServerTangibleObjectTemplate::getCompilerIntegerParam(con
|
||||
}
|
||||
else
|
||||
return ServerObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerTangibleObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerTangibleObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -196,9 +196,9 @@ BoolParam * ServerTangibleObjectTemplate::getBoolParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_wantSawAttackTriggers;
|
||||
}
|
||||
@@ -206,7 +206,7 @@ BoolParam * ServerTangibleObjectTemplate::getBoolParam(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return ServerObjectTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerTangibleObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * ServerTangibleObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -217,9 +217,9 @@ StringParam * ServerTangibleObjectTemplate::getStringParam(const char *name, boo
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_armor;
|
||||
}
|
||||
@@ -227,7 +227,7 @@ StringParam * ServerTangibleObjectTemplate::getStringParam(const char *name, boo
|
||||
}
|
||||
else
|
||||
return ServerObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerTangibleObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerTangibleObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -266,7 +266,7 @@ TriggerVolumeParam * ServerTangibleObjectTemplate::getTriggerVolumeParam(const c
|
||||
}
|
||||
else
|
||||
return ServerObjectTemplate::getTriggerVolumeParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerTangibleObjectTemplate::getTriggerVolumeParam
|
||||
|
||||
void ServerTangibleObjectTemplate::initStructParamOT(StructParamOT ¶m, const char *name)
|
||||
@@ -341,12 +341,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
@@ -374,7 +374,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_triggerVolumes.begin(); iter != m_triggerVolumes.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_triggerVolumes.clear();
|
||||
m_triggerVolumesAppend = file.read_bool8();
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerTokenObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerTokenObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerTokenObjectTemplate * base = dynamic_cast<const ServerTokenObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerTokenObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+195
-195
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -86,10 +86,10 @@ Tag ServerUniverseObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerUniverseObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerUniverseObjectTemplate * base = dynamic_cast<const ServerUniverseObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerUniverseObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+15
-15
@@ -86,10 +86,10 @@ Tag ServerVehicleObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerVehicleObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerVehicleObjectTemplate * base = dynamic_cast<const ServerVehicleObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerVehicleObjectTemplate::getHighestTemplateVersion
|
||||
@@ -108,9 +108,9 @@ FloatParam * ServerVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_currentFuel;
|
||||
}
|
||||
@@ -122,9 +122,9 @@ FloatParam * ServerVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxFuel;
|
||||
}
|
||||
@@ -136,9 +136,9 @@ FloatParam * ServerVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_consumpsion;
|
||||
}
|
||||
@@ -146,7 +146,7 @@ FloatParam * ServerVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerVehicleObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * ServerVehicleObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -162,9 +162,9 @@ StringParam * ServerVehicleObjectTemplate::getStringParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_fuelType;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ StringParam * ServerVehicleObjectTemplate::getStringParam(const char *name, bool
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerVehicleObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * ServerVehicleObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -255,12 +255,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerWaypointObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerWaypointObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerWaypointObjectTemplate * base = dynamic_cast<const ServerWaypointObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerWaypointObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+37
-37
@@ -86,10 +86,10 @@ Tag ServerWeaponObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerWeaponObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerWeaponObjectTemplate * base = dynamic_cast<const ServerWeaponObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerWeaponObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_weaponType;
|
||||
}
|
||||
@@ -117,9 +117,9 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_attackType;
|
||||
}
|
||||
@@ -131,9 +131,9 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_damageType;
|
||||
}
|
||||
@@ -145,9 +145,9 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_elementalType;
|
||||
}
|
||||
@@ -159,9 +159,9 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_elementalValue;
|
||||
}
|
||||
@@ -173,9 +173,9 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_minDamageAmount;
|
||||
}
|
||||
@@ -187,9 +187,9 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxDamageAmount;
|
||||
}
|
||||
@@ -201,9 +201,9 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_attackCost;
|
||||
}
|
||||
@@ -215,9 +215,9 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_accuracy;
|
||||
}
|
||||
@@ -225,7 +225,7 @@ CompilerIntegerParam * ServerWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerWeaponObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * ServerWeaponObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -236,9 +236,9 @@ FloatParam * ServerWeaponObjectTemplate::getFloatParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_attackSpeed;
|
||||
}
|
||||
@@ -250,9 +250,9 @@ FloatParam * ServerWeaponObjectTemplate::getFloatParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_audibleRange;
|
||||
}
|
||||
@@ -264,9 +264,9 @@ FloatParam * ServerWeaponObjectTemplate::getFloatParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_minRange;
|
||||
}
|
||||
@@ -278,9 +278,9 @@ FloatParam * ServerWeaponObjectTemplate::getFloatParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxRange;
|
||||
}
|
||||
@@ -292,9 +292,9 @@ FloatParam * ServerWeaponObjectTemplate::getFloatParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_damageRadius;
|
||||
}
|
||||
@@ -306,9 +306,9 @@ FloatParam * ServerWeaponObjectTemplate::getFloatParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_woundChance;
|
||||
}
|
||||
@@ -316,7 +316,7 @@ FloatParam * ServerWeaponObjectTemplate::getFloatParam(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return ServerTangibleObjectTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //ServerWeaponObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * ServerWeaponObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -409,12 +409,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag ServerXpManagerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag ServerXpManagerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const ServerXpManagerObjectTemplate * base = dynamic_cast<const ServerXpManagerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // ServerXpManagerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+11
-11
@@ -86,10 +86,10 @@ Tag SharedBattlefieldMarkerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedBattlefieldMarkerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedBattlefieldMarkerObjectTemplate * base = dynamic_cast<const SharedBattlefieldMarkerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedBattlefieldMarkerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * SharedBattlefieldMarkerObjectTemplate::getCompilerInteger
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_numberOfPoles;
|
||||
}
|
||||
@@ -113,7 +113,7 @@ CompilerIntegerParam * SharedBattlefieldMarkerObjectTemplate::getCompilerInteger
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedBattlefieldMarkerObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * SharedBattlefieldMarkerObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -124,9 +124,9 @@ FloatParam * SharedBattlefieldMarkerObjectTemplate::getFloatParam(const char *na
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_radius;
|
||||
}
|
||||
@@ -134,7 +134,7 @@ FloatParam * SharedBattlefieldMarkerObjectTemplate::getFloatParam(const char *na
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedBattlefieldMarkerObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * SharedBattlefieldMarkerObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -227,12 +227,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+10
-10
@@ -86,10 +86,10 @@ Tag SharedBuildingObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedBuildingObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedBuildingObjectTemplate * base = dynamic_cast<const SharedBuildingObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedBuildingObjectTemplate::getHighestTemplateVersion
|
||||
@@ -118,9 +118,9 @@ StringParam * SharedBuildingObjectTemplate::getStringParam(const char *name, boo
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_terrainModificationFileName;
|
||||
}
|
||||
@@ -132,9 +132,9 @@ StringParam * SharedBuildingObjectTemplate::getStringParam(const char *name, boo
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_interiorLayoutFileName;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ StringParam * SharedBuildingObjectTemplate::getStringParam(const char *name, boo
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedBuildingObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * SharedBuildingObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -225,12 +225,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedCellObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedCellObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedCellObjectTemplate * base = dynamic_cast<const SharedCellObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedCellObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedConstructionContractObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedConstructionContractObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedConstructionContractObjectTemplate * base = dynamic_cast<const SharedConstructionContractObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedConstructionContractObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+53
-53
@@ -86,10 +86,10 @@ Tag SharedCreatureObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedCreatureObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedCreatureObjectTemplate * base = dynamic_cast<const SharedCreatureObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedCreatureObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * SharedCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_gender;
|
||||
}
|
||||
@@ -117,9 +117,9 @@ CompilerIntegerParam * SharedCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_niche;
|
||||
}
|
||||
@@ -131,9 +131,9 @@ CompilerIntegerParam * SharedCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_species;
|
||||
}
|
||||
@@ -145,9 +145,9 @@ CompilerIntegerParam * SharedCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_race;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ CompilerIntegerParam * SharedCreatureObjectTemplate::getCompilerIntegerParam(con
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedCreatureObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -166,9 +166,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_acceleration[index];
|
||||
}
|
||||
@@ -180,9 +180,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_speed[index];
|
||||
}
|
||||
@@ -194,9 +194,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_turnRate[index];
|
||||
}
|
||||
@@ -208,9 +208,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_slopeModAngle;
|
||||
}
|
||||
@@ -222,9 +222,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_slopeModPercent;
|
||||
}
|
||||
@@ -236,9 +236,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_waterModPercent;
|
||||
}
|
||||
@@ -250,9 +250,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_stepHeight;
|
||||
}
|
||||
@@ -264,9 +264,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_collisionHeight;
|
||||
}
|
||||
@@ -278,9 +278,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_collisionRadius;
|
||||
}
|
||||
@@ -292,9 +292,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_swimHeight;
|
||||
}
|
||||
@@ -306,9 +306,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_warpTolerance;
|
||||
}
|
||||
@@ -320,9 +320,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_collisionOffsetX;
|
||||
}
|
||||
@@ -334,9 +334,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_collisionOffsetZ;
|
||||
}
|
||||
@@ -348,9 +348,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_collisionLength;
|
||||
}
|
||||
@@ -362,9 +362,9 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_cameraHeight;
|
||||
}
|
||||
@@ -372,7 +372,7 @@ FloatParam * SharedCreatureObjectTemplate::getFloatParam(const char *name, bool
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedCreatureObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * SharedCreatureObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -383,9 +383,9 @@ BoolParam * SharedCreatureObjectTemplate::getBoolParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_postureAlignToTerrain[index];
|
||||
}
|
||||
@@ -393,7 +393,7 @@ BoolParam * SharedCreatureObjectTemplate::getBoolParam(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedCreatureObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * SharedCreatureObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -404,9 +404,9 @@ StringParam * SharedCreatureObjectTemplate::getStringParam(const char *name, boo
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_animationMapFilename;
|
||||
}
|
||||
@@ -418,9 +418,9 @@ StringParam * SharedCreatureObjectTemplate::getStringParam(const char *name, boo
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_movementDatatable;
|
||||
}
|
||||
@@ -428,7 +428,7 @@ StringParam * SharedCreatureObjectTemplate::getStringParam(const char *name, boo
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedCreatureObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * SharedCreatureObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -528,12 +528,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+27
-27
@@ -47,7 +47,7 @@ SharedDraftSchematicObjectTemplate::~SharedDraftSchematicObjectTemplate()
|
||||
for (iter = m_slots.begin(); iter != m_slots.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_slots.clear();
|
||||
}
|
||||
@@ -56,7 +56,7 @@ SharedDraftSchematicObjectTemplate::~SharedDraftSchematicObjectTemplate()
|
||||
for (iter = m_attributes.begin(); iter != m_attributes.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_attributes.clear();
|
||||
}
|
||||
@@ -108,10 +108,10 @@ Tag SharedDraftSchematicObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedDraftSchematicObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedDraftSchematicObjectTemplate * base = dynamic_cast<const SharedDraftSchematicObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedDraftSchematicObjectTemplate::getHighestTemplateVersion
|
||||
@@ -140,9 +140,9 @@ StringParam * SharedDraftSchematicObjectTemplate::getStringParam(const char *nam
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_craftedSharedTemplate;
|
||||
}
|
||||
@@ -150,7 +150,7 @@ StringParam * SharedDraftSchematicObjectTemplate::getStringParam(const char *nam
|
||||
}
|
||||
else
|
||||
return SharedIntangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedDraftSchematicObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * SharedDraftSchematicObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -196,7 +196,7 @@ StructParamOT * SharedDraftSchematicObjectTemplate::getStructParamOT(const char
|
||||
}
|
||||
else
|
||||
return SharedIntangibleObjectTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedDraftSchematicObjectTemplate::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * SharedDraftSchematicObjectTemplate::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
@@ -294,12 +294,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
@@ -327,7 +327,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_slots.begin(); iter != m_slots.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_slots.clear();
|
||||
m_slotsAppend = file.read_bool8();
|
||||
@@ -346,7 +346,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_attributes.begin(); iter != m_attributes.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_attributes.clear();
|
||||
m_attributesAppend = file.read_bool8();
|
||||
@@ -512,9 +512,9 @@ StringParam * SharedDraftSchematicObjectTemplate::_IngredientSlot::getStringPara
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_hardpoint;
|
||||
}
|
||||
@@ -522,7 +522,7 @@ StringParam * SharedDraftSchematicObjectTemplate::_IngredientSlot::getStringPara
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedDraftSchematicObjectTemplate::_IngredientSlot::getStringParam
|
||||
|
||||
StringIdParam * SharedDraftSchematicObjectTemplate::_IngredientSlot::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -533,9 +533,9 @@ StringIdParam * SharedDraftSchematicObjectTemplate::_IngredientSlot::getStringId
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_name;
|
||||
}
|
||||
@@ -543,7 +543,7 @@ StringIdParam * SharedDraftSchematicObjectTemplate::_IngredientSlot::getStringId
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedDraftSchematicObjectTemplate::_IngredientSlot::getStringIdParam
|
||||
|
||||
VectorParam * SharedDraftSchematicObjectTemplate::_IngredientSlot::getVectorParam(const char *name, bool deepCheck, int index)
|
||||
@@ -717,9 +717,9 @@ CompilerIntegerParam * SharedDraftSchematicObjectTemplate::_SchematicAttribute::
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_value;
|
||||
}
|
||||
@@ -727,7 +727,7 @@ CompilerIntegerParam * SharedDraftSchematicObjectTemplate::_SchematicAttribute::
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedDraftSchematicObjectTemplate::_SchematicAttribute::getCompilerIntegerParam
|
||||
|
||||
FloatParam * SharedDraftSchematicObjectTemplate::_SchematicAttribute::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -753,9 +753,9 @@ StringIdParam * SharedDraftSchematicObjectTemplate::_SchematicAttribute::getStri
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_name;
|
||||
}
|
||||
@@ -767,9 +767,9 @@ StringIdParam * SharedDraftSchematicObjectTemplate::_SchematicAttribute::getStri
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_experiment;
|
||||
}
|
||||
@@ -777,7 +777,7 @@ StringIdParam * SharedDraftSchematicObjectTemplate::_SchematicAttribute::getStri
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedDraftSchematicObjectTemplate::_SchematicAttribute::getStringIdParam
|
||||
|
||||
VectorParam * SharedDraftSchematicObjectTemplate::_SchematicAttribute::getVectorParam(const char *name, bool deepCheck, int index)
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedFactoryObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedFactoryObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedFactoryObjectTemplate * base = dynamic_cast<const SharedFactoryObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedFactoryObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedGroupObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedGroupObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedGroupObjectTemplate * base = dynamic_cast<const SharedGroupObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedGroupObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedGuildObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedGuildObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedGuildObjectTemplate * base = dynamic_cast<const SharedGuildObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedGuildObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedInstallationObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedInstallationObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedInstallationObjectTemplate * base = dynamic_cast<const SharedInstallationObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedInstallationObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedIntangibleObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedIntangibleObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedIntangibleObjectTemplate * base = dynamic_cast<const SharedIntangibleObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedIntangibleObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedJediManagerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedJediManagerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedJediManagerObjectTemplate * base = dynamic_cast<const SharedJediManagerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedJediManagerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedManufactureSchematicObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedManufactureSchematicObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedManufactureSchematicObjectTemplate * base = dynamic_cast<const SharedManufactureSchematicObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedManufactureSchematicObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedMissionObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedMissionObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedMissionObjectTemplate * base = dynamic_cast<const SharedMissionObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedMissionObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
@@ -86,10 +86,10 @@ Tag SharedObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedObjectTemplate * base = dynamic_cast<const SharedObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * SharedObjectTemplate::getCompilerIntegerParam(const char
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_containerType;
|
||||
}
|
||||
@@ -117,9 +117,9 @@ CompilerIntegerParam * SharedObjectTemplate::getCompilerIntegerParam(const char
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_containerVolumeLimit;
|
||||
}
|
||||
@@ -131,9 +131,9 @@ CompilerIntegerParam * SharedObjectTemplate::getCompilerIntegerParam(const char
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_gameObjectType;
|
||||
}
|
||||
@@ -145,9 +145,9 @@ CompilerIntegerParam * SharedObjectTemplate::getCompilerIntegerParam(const char
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_surfaceType;
|
||||
}
|
||||
@@ -155,7 +155,7 @@ CompilerIntegerParam * SharedObjectTemplate::getCompilerIntegerParam(const char
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * SharedObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -166,9 +166,9 @@ FloatParam * SharedObjectTemplate::getFloatParam(const char *name, bool deepChec
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_scale;
|
||||
}
|
||||
@@ -180,9 +180,9 @@ FloatParam * SharedObjectTemplate::getFloatParam(const char *name, bool deepChec
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_scaleThresholdBeforeExtentTest;
|
||||
}
|
||||
@@ -194,9 +194,9 @@ FloatParam * SharedObjectTemplate::getFloatParam(const char *name, bool deepChec
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_clearFloraRadius;
|
||||
}
|
||||
@@ -208,9 +208,9 @@ FloatParam * SharedObjectTemplate::getFloatParam(const char *name, bool deepChec
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_noBuildRadius;
|
||||
}
|
||||
@@ -222,9 +222,9 @@ FloatParam * SharedObjectTemplate::getFloatParam(const char *name, bool deepChec
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_locationReservationRadius;
|
||||
}
|
||||
@@ -232,7 +232,7 @@ FloatParam * SharedObjectTemplate::getFloatParam(const char *name, bool deepChec
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * SharedObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -243,9 +243,9 @@ BoolParam * SharedObjectTemplate::getBoolParam(const char *name, bool deepCheck,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_snapToTerrain;
|
||||
}
|
||||
@@ -257,9 +257,9 @@ BoolParam * SharedObjectTemplate::getBoolParam(const char *name, bool deepCheck,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_sendToClient;
|
||||
}
|
||||
@@ -271,9 +271,9 @@ BoolParam * SharedObjectTemplate::getBoolParam(const char *name, bool deepCheck,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_onlyVisibleInTools;
|
||||
}
|
||||
@@ -285,9 +285,9 @@ BoolParam * SharedObjectTemplate::getBoolParam(const char *name, bool deepCheck,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_forceNoCollision;
|
||||
}
|
||||
@@ -295,7 +295,7 @@ BoolParam * SharedObjectTemplate::getBoolParam(const char *name, bool deepCheck,
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * SharedObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -306,9 +306,9 @@ StringParam * SharedObjectTemplate::getStringParam(const char *name, bool deepCh
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_tintPalette;
|
||||
}
|
||||
@@ -320,9 +320,9 @@ StringParam * SharedObjectTemplate::getStringParam(const char *name, bool deepCh
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_slotDescriptorFilename;
|
||||
}
|
||||
@@ -334,9 +334,9 @@ StringParam * SharedObjectTemplate::getStringParam(const char *name, bool deepCh
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_arrangementDescriptorFilename;
|
||||
}
|
||||
@@ -348,9 +348,9 @@ StringParam * SharedObjectTemplate::getStringParam(const char *name, bool deepCh
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_appearanceFilename;
|
||||
}
|
||||
@@ -362,9 +362,9 @@ StringParam * SharedObjectTemplate::getStringParam(const char *name, bool deepCh
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_portalLayoutFilename;
|
||||
}
|
||||
@@ -376,9 +376,9 @@ StringParam * SharedObjectTemplate::getStringParam(const char *name, bool deepCh
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_clientDataFile;
|
||||
}
|
||||
@@ -386,7 +386,7 @@ StringParam * SharedObjectTemplate::getStringParam(const char *name, bool deepCh
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * SharedObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -397,9 +397,9 @@ StringIdParam * SharedObjectTemplate::getStringIdParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_objectName;
|
||||
}
|
||||
@@ -411,9 +411,9 @@ StringIdParam * SharedObjectTemplate::getStringIdParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_detailedDescription;
|
||||
}
|
||||
@@ -425,9 +425,9 @@ StringIdParam * SharedObjectTemplate::getStringIdParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_lookAtText;
|
||||
}
|
||||
@@ -435,7 +435,7 @@ StringIdParam * SharedObjectTemplate::getStringIdParam(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringIdParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedObjectTemplate::getStringIdParam
|
||||
|
||||
VectorParam * SharedObjectTemplate::getVectorParam(const char *name, bool deepCheck, int index)
|
||||
@@ -513,12 +513,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedPlayerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedPlayerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedPlayerObjectTemplate * base = dynamic_cast<const SharedPlayerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedPlayerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -87,10 +87,10 @@ Tag SharedPlayerQuestObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedPlayerQuestObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedPlayerQuestObjectTemplate * base = dynamic_cast<const SharedPlayerQuestObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedPlayerQuestObjectTemplate::getHighestTemplateVersion
|
||||
@@ -196,12 +196,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedResourceContainerObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedResourceContainerObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedResourceContainerObjectTemplate * base = dynamic_cast<const SharedResourceContainerObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedResourceContainerObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+15
-15
@@ -86,10 +86,10 @@ Tag SharedShipObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedShipObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedShipObjectTemplate * base = dynamic_cast<const SharedShipObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedShipObjectTemplate::getHighestTemplateVersion
|
||||
@@ -113,9 +113,9 @@ BoolParam * SharedShipObjectTemplate::getBoolParam(const char *name, bool deepCh
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_hasWings;
|
||||
}
|
||||
@@ -127,9 +127,9 @@ BoolParam * SharedShipObjectTemplate::getBoolParam(const char *name, bool deepCh
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_playerControlled;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ BoolParam * SharedShipObjectTemplate::getBoolParam(const char *name, bool deepCh
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedShipObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * SharedShipObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -148,9 +148,9 @@ StringParam * SharedShipObjectTemplate::getStringParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_cockpitFilename;
|
||||
}
|
||||
@@ -162,9 +162,9 @@ StringParam * SharedShipObjectTemplate::getStringParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_interiorLayoutFileName;
|
||||
}
|
||||
@@ -172,7 +172,7 @@ StringParam * SharedShipObjectTemplate::getStringParam(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedShipObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * SharedShipObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -255,12 +255,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedStaticObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedStaticObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedStaticObjectTemplate * base = dynamic_cast<const SharedStaticObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedStaticObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+57
-57
@@ -55,7 +55,7 @@ SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate()
|
||||
for (iter = m_paletteColorCustomizationVariables.begin(); iter != m_paletteColorCustomizationVariables.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_paletteColorCustomizationVariables.clear();
|
||||
}
|
||||
@@ -64,7 +64,7 @@ SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate()
|
||||
for (iter = m_rangedIntCustomizationVariables.begin(); iter != m_rangedIntCustomizationVariables.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_rangedIntCustomizationVariables.clear();
|
||||
}
|
||||
@@ -73,7 +73,7 @@ SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate()
|
||||
for (iter = m_constStringCustomizationVariables.begin(); iter != m_constStringCustomizationVariables.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_constStringCustomizationVariables.clear();
|
||||
}
|
||||
@@ -82,7 +82,7 @@ SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate()
|
||||
for (iter = m_socketDestinations.begin(); iter != m_socketDestinations.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_socketDestinations.clear();
|
||||
}
|
||||
@@ -91,7 +91,7 @@ SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate()
|
||||
for (iter = m_certificationsRequired.begin(); iter != m_certificationsRequired.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_certificationsRequired.clear();
|
||||
}
|
||||
@@ -100,7 +100,7 @@ SharedTangibleObjectTemplate::~SharedTangibleObjectTemplate()
|
||||
for (iter = m_customizationVariableMapping.begin(); iter != m_customizationVariableMapping.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_customizationVariableMapping.clear();
|
||||
}
|
||||
@@ -152,10 +152,10 @@ Tag SharedTangibleObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedTangibleObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedTangibleObjectTemplate * base = dynamic_cast<const SharedTangibleObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedTangibleObjectTemplate::getHighestTemplateVersion
|
||||
@@ -181,9 +181,9 @@ CompilerIntegerParam * SharedTangibleObjectTemplate::getCompilerIntegerParam(con
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_clientVisabilityFlag;
|
||||
}
|
||||
@@ -191,7 +191,7 @@ CompilerIntegerParam * SharedTangibleObjectTemplate::getCompilerIntegerParam(con
|
||||
}
|
||||
else
|
||||
return SharedObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * SharedTangibleObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -207,9 +207,9 @@ BoolParam * SharedTangibleObjectTemplate::getBoolParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_useStructureFootprintOutline;
|
||||
}
|
||||
@@ -221,9 +221,9 @@ BoolParam * SharedTangibleObjectTemplate::getBoolParam(const char *name, bool de
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_targetable;
|
||||
}
|
||||
@@ -231,7 +231,7 @@ BoolParam * SharedTangibleObjectTemplate::getBoolParam(const char *name, bool de
|
||||
}
|
||||
else
|
||||
return SharedObjectTemplate::getBoolParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::getBoolParam
|
||||
|
||||
StringParam * SharedTangibleObjectTemplate::getStringParam(const char *name, bool deepCheck, int index)
|
||||
@@ -242,9 +242,9 @@ StringParam * SharedTangibleObjectTemplate::getStringParam(const char *name, boo
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_structureFootprintFileName;
|
||||
}
|
||||
@@ -264,7 +264,7 @@ StringParam * SharedTangibleObjectTemplate::getStringParam(const char *name, boo
|
||||
}
|
||||
else
|
||||
return SharedObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * SharedTangibleObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -334,7 +334,7 @@ StructParamOT * SharedTangibleObjectTemplate::getStructParamOT(const char *name,
|
||||
}
|
||||
else
|
||||
return SharedObjectTemplate::getStructParamOT(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::getStructParamOT
|
||||
|
||||
TriggerVolumeParam * SharedTangibleObjectTemplate::getTriggerVolumeParam(const char *name, bool deepCheck, int index)
|
||||
@@ -488,12 +488,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
@@ -521,7 +521,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_paletteColorCustomizationVariables.begin(); iter != m_paletteColorCustomizationVariables.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_paletteColorCustomizationVariables.clear();
|
||||
m_paletteColorCustomizationVariablesAppend = file.read_bool8();
|
||||
@@ -540,7 +540,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_rangedIntCustomizationVariables.begin(); iter != m_rangedIntCustomizationVariables.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_rangedIntCustomizationVariables.clear();
|
||||
m_rangedIntCustomizationVariablesAppend = file.read_bool8();
|
||||
@@ -559,7 +559,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_constStringCustomizationVariables.begin(); iter != m_constStringCustomizationVariables.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_constStringCustomizationVariables.clear();
|
||||
m_constStringCustomizationVariablesAppend = file.read_bool8();
|
||||
@@ -578,7 +578,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_socketDestinations.begin(); iter != m_socketDestinations.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_socketDestinations.clear();
|
||||
m_socketDestinationsAppend = file.read_bool8();
|
||||
@@ -603,7 +603,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_certificationsRequired.begin(); iter != m_certificationsRequired.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_certificationsRequired.clear();
|
||||
m_certificationsRequiredAppend = file.read_bool8();
|
||||
@@ -622,7 +622,7 @@ char paramName[MAX_NAME_SIZE];
|
||||
for (iter = m_customizationVariableMapping.begin(); iter != m_customizationVariableMapping.end(); ++iter)
|
||||
{
|
||||
delete *iter;
|
||||
*iter = NULL;
|
||||
*iter = nullptr;
|
||||
}
|
||||
m_customizationVariableMapping.clear();
|
||||
m_customizationVariableMappingAppend = file.read_bool8();
|
||||
@@ -866,9 +866,9 @@ StringParam * SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::g
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_variableName;
|
||||
}
|
||||
@@ -880,9 +880,9 @@ StringParam * SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::g
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_constValue;
|
||||
}
|
||||
@@ -890,7 +890,7 @@ StringParam * SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::g
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getStringParam
|
||||
|
||||
StringIdParam * SharedTangibleObjectTemplate::_ConstStringCustomizationVariable::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1084,9 +1084,9 @@ StringParam * SharedTangibleObjectTemplate::_CustomizationVariableMapping::getSt
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_sourceVariable;
|
||||
}
|
||||
@@ -1098,9 +1098,9 @@ StringParam * SharedTangibleObjectTemplate::_CustomizationVariableMapping::getSt
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_dependentVariable;
|
||||
}
|
||||
@@ -1108,7 +1108,7 @@ StringParam * SharedTangibleObjectTemplate::_CustomizationVariableMapping::getSt
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::_CustomizationVariableMapping::getStringParam
|
||||
|
||||
StringIdParam * SharedTangibleObjectTemplate::_CustomizationVariableMapping::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1287,9 +1287,9 @@ CompilerIntegerParam * SharedTangibleObjectTemplate::_PaletteColorCustomizationV
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_defaultPaletteIndex;
|
||||
}
|
||||
@@ -1297,7 +1297,7 @@ CompilerIntegerParam * SharedTangibleObjectTemplate::_PaletteColorCustomizationV
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getCompilerIntegerParam
|
||||
|
||||
FloatParam * SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1318,9 +1318,9 @@ StringParam * SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_variableName;
|
||||
}
|
||||
@@ -1332,9 +1332,9 @@ StringParam * SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_palettePathName;
|
||||
}
|
||||
@@ -1342,7 +1342,7 @@ StringParam * SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getStringParam
|
||||
|
||||
StringIdParam * SharedTangibleObjectTemplate::_PaletteColorCustomizationVariable::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1529,9 +1529,9 @@ CompilerIntegerParam * SharedTangibleObjectTemplate::_RangedIntCustomizationVari
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_minValueInclusive;
|
||||
}
|
||||
@@ -1543,9 +1543,9 @@ CompilerIntegerParam * SharedTangibleObjectTemplate::_RangedIntCustomizationVari
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_defaultValue;
|
||||
}
|
||||
@@ -1557,9 +1557,9 @@ CompilerIntegerParam * SharedTangibleObjectTemplate::_RangedIntCustomizationVari
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxValueExclusive;
|
||||
}
|
||||
@@ -1567,7 +1567,7 @@ CompilerIntegerParam * SharedTangibleObjectTemplate::_RangedIntCustomizationVari
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getCompilerIntegerParam
|
||||
|
||||
FloatParam * SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -1588,9 +1588,9 @@ StringParam * SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::get
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_variableName;
|
||||
}
|
||||
@@ -1598,7 +1598,7 @@ StringParam * SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::get
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getStringParam
|
||||
|
||||
StringIdParam * SharedTangibleObjectTemplate::_RangedIntCustomizationVariable::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
|
||||
+11
-11
@@ -86,10 +86,10 @@ Tag SharedTerrainSurfaceObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedTerrainSurfaceObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedTerrainSurfaceObjectTemplate * base = dynamic_cast<const SharedTerrainSurfaceObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedTerrainSurfaceObjectTemplate::getHighestTemplateVersion
|
||||
@@ -108,9 +108,9 @@ FloatParam * SharedTerrainSurfaceObjectTemplate::getFloatParam(const char *name,
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_cover;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ FloatParam * SharedTerrainSurfaceObjectTemplate::getFloatParam(const char *name,
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTerrainSurfaceObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * SharedTerrainSurfaceObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -134,9 +134,9 @@ StringParam * SharedTerrainSurfaceObjectTemplate::getStringParam(const char *nam
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_surfaceType;
|
||||
}
|
||||
@@ -144,7 +144,7 @@ StringParam * SharedTerrainSurfaceObjectTemplate::getStringParam(const char *nam
|
||||
}
|
||||
else
|
||||
return TpfTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedTerrainSurfaceObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * SharedTerrainSurfaceObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -227,12 +227,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedTokenObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedTokenObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedTokenObjectTemplate * base = dynamic_cast<const SharedTokenObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedTokenObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedUniverseObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedUniverseObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedUniverseObjectTemplate * base = dynamic_cast<const SharedUniverseObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedUniverseObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+20
-20
@@ -86,10 +86,10 @@ Tag SharedVehicleObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedVehicleObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedVehicleObjectTemplate * base = dynamic_cast<const SharedVehicleObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedVehicleObjectTemplate::getHighestTemplateVersion
|
||||
@@ -108,9 +108,9 @@ FloatParam * SharedVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, index))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_speed[index];
|
||||
}
|
||||
@@ -122,9 +122,9 @@ FloatParam * SharedVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_slopeAversion;
|
||||
}
|
||||
@@ -136,9 +136,9 @@ FloatParam * SharedVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_hoverValue;
|
||||
}
|
||||
@@ -150,9 +150,9 @@ FloatParam * SharedVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_turnRate;
|
||||
}
|
||||
@@ -164,9 +164,9 @@ FloatParam * SharedVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_maxVelocity;
|
||||
}
|
||||
@@ -178,9 +178,9 @@ FloatParam * SharedVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_acceleration;
|
||||
}
|
||||
@@ -192,9 +192,9 @@ FloatParam * SharedVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_braking;
|
||||
}
|
||||
@@ -202,7 +202,7 @@ FloatParam * SharedVehicleObjectTemplate::getFloatParam(const char *name, bool d
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getFloatParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedVehicleObjectTemplate::getFloatParam
|
||||
|
||||
BoolParam * SharedVehicleObjectTemplate::getBoolParam(const char *name, bool deepCheck, int index)
|
||||
@@ -300,12 +300,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+5
-5
@@ -86,10 +86,10 @@ Tag SharedWaypointObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedWaypointObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedWaypointObjectTemplate * base = dynamic_cast<const SharedWaypointObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedWaypointObjectTemplate::getHighestTemplateVersion
|
||||
@@ -195,12 +195,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
+13
-13
@@ -86,10 +86,10 @@ Tag SharedWeaponObjectTemplate::getTemplateVersion(void) const
|
||||
*/
|
||||
Tag SharedWeaponObjectTemplate::getHighestTemplateVersion(void) const
|
||||
{
|
||||
if (m_baseData == NULL)
|
||||
if (m_baseData == nullptr)
|
||||
return m_templateVersion;
|
||||
const SharedWeaponObjectTemplate * base = dynamic_cast<const SharedWeaponObjectTemplate *>(m_baseData);
|
||||
if (base == NULL)
|
||||
if (base == nullptr)
|
||||
return m_templateVersion;
|
||||
return std::max(m_templateVersion, base->getHighestTemplateVersion());
|
||||
} // SharedWeaponObjectTemplate::getHighestTemplateVersion
|
||||
@@ -103,9 +103,9 @@ CompilerIntegerParam * SharedWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_weaponEffectIndex;
|
||||
}
|
||||
@@ -117,9 +117,9 @@ CompilerIntegerParam * SharedWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_attackType;
|
||||
}
|
||||
@@ -127,7 +127,7 @@ CompilerIntegerParam * SharedWeaponObjectTemplate::getCompilerIntegerParam(const
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getCompilerIntegerParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedWeaponObjectTemplate::getCompilerIntegerParam
|
||||
|
||||
FloatParam * SharedWeaponObjectTemplate::getFloatParam(const char *name, bool deepCheck, int index)
|
||||
@@ -148,9 +148,9 @@ StringParam * SharedWeaponObjectTemplate::getStringParam(const char *name, bool
|
||||
{
|
||||
if (deepCheck && !isParamLoaded(name, false, 0))
|
||||
{
|
||||
if (getBaseTemplate() != NULL)
|
||||
if (getBaseTemplate() != nullptr)
|
||||
return getBaseTemplate()->getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return &m_weaponEffect;
|
||||
}
|
||||
@@ -158,7 +158,7 @@ StringParam * SharedWeaponObjectTemplate::getStringParam(const char *name, bool
|
||||
}
|
||||
else
|
||||
return SharedTangibleObjectTemplate::getStringParam(name, deepCheck, index);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
} //SharedWeaponObjectTemplate::getStringParam
|
||||
|
||||
StringIdParam * SharedWeaponObjectTemplate::getStringIdParam(const char *name, bool deepCheck, int index)
|
||||
@@ -241,12 +241,12 @@ char paramName[MAX_NAME_SIZE];
|
||||
file.read_string(baseFilename);
|
||||
file.exitChunk();
|
||||
const ObjectTemplate *base = ObjectTemplateList::fetch(baseFilename);
|
||||
DEBUG_WARNING(base == NULL, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != NULL)
|
||||
DEBUG_WARNING(base == nullptr, ("was unable to load base template %s", baseFilename.c_str()));
|
||||
if (m_baseData == base && base != nullptr)
|
||||
base->releaseReference();
|
||||
else
|
||||
{
|
||||
if (m_baseData != NULL)
|
||||
if (m_baseData != nullptr)
|
||||
m_baseData->releaseReference();
|
||||
m_baseData = base;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user