mirror of
https://bitbucket.org/theswgsource/src-1.2.git
synced 2026-07-28 23:16:15 -04:00
newer standards prefer nullptr over NULL - this is most of them but there are others too
This commit is contained in:
@@ -140,7 +140,7 @@ using namespace BuildingObjectNamespace;
|
||||
|
||||
// ======================================================================
|
||||
|
||||
const SharedObjectTemplate * BuildingObject::m_defaultSharedTemplate = NULL;
|
||||
const SharedObjectTemplate * BuildingObject::m_defaultSharedTemplate = nullptr;
|
||||
|
||||
|
||||
// ======================================================================
|
||||
@@ -380,13 +380,13 @@ const SharedObjectTemplate * BuildingObject::getDefaultSharedTemplate(void) cons
|
||||
{
|
||||
static const ConstCharCrcLowerString templateName("object/building/base/shared_building_default.iff");
|
||||
|
||||
if (m_defaultSharedTemplate == NULL)
|
||||
if (m_defaultSharedTemplate == nullptr)
|
||||
{
|
||||
m_defaultSharedTemplate = safe_cast<const SharedObjectTemplate *>(
|
||||
ObjectTemplateList::fetch(templateName));
|
||||
WARNING_STRICT_FATAL(m_defaultSharedTemplate == NULL, ("Cannot create "
|
||||
WARNING_STRICT_FATAL(m_defaultSharedTemplate == nullptr, ("Cannot create "
|
||||
"default shared object template %s", templateName.getString()));
|
||||
if (m_defaultSharedTemplate != NULL)
|
||||
if (m_defaultSharedTemplate != nullptr)
|
||||
ExitChain::add (removeDefaultTemplate, "BuildingObject::removeDefaultTemplate");
|
||||
}
|
||||
return m_defaultSharedTemplate;
|
||||
@@ -399,10 +399,10 @@ static const ConstCharCrcLowerString templateName("object/building/base/shared_b
|
||||
*/
|
||||
void BuildingObject::removeDefaultTemplate(void)
|
||||
{
|
||||
if (m_defaultSharedTemplate != NULL)
|
||||
if (m_defaultSharedTemplate != nullptr)
|
||||
{
|
||||
m_defaultSharedTemplate->releaseReference();
|
||||
m_defaultSharedTemplate = NULL;
|
||||
m_defaultSharedTemplate = nullptr;
|
||||
}
|
||||
} // BuildingObject::removeDefaultTemplate
|
||||
|
||||
@@ -432,7 +432,7 @@ void BuildingObject::expelObject(ServerObject &who)
|
||||
if (controller)
|
||||
{
|
||||
CellProperty *parentCell = getParentCell();
|
||||
ServerObject *destinationCellObject = NULL;
|
||||
ServerObject *destinationCellObject = nullptr;
|
||||
|
||||
if (!parentCell->isWorldCell())
|
||||
destinationCellObject = safe_cast<ServerObject*>(&parentCell->getOwner());
|
||||
@@ -902,7 +902,7 @@ void BuildingObject::changeTeleportDestination(Vector & position, float & yaw) c
|
||||
{
|
||||
DataTable * respawnTable = DataTableManager::getTable(CLONE_RESPAWN_TABLE,
|
||||
true);
|
||||
if (respawnTable != NULL)
|
||||
if (respawnTable != nullptr)
|
||||
{
|
||||
int row = respawnTable->searchColumnString(0, getTemplateName());
|
||||
if (row >= 0)
|
||||
|
||||
Reference in New Issue
Block a user