dial back nullPtr usage

while it still remains a good idea to port as many NULL compares and assignments over to nullPtr as feasable, we do still need to sort out how to better support scripted empty, false, and zero assigns for things like objectIDs.

this means we'll need to both fully convert the backend of the parser to support that kind of thing, but also alter most if not all exisiting NULLs. up to and including things like SAFE_DELETE. while that's certainly feasable, given there's aproximatel 400 nullptr assigns/checks prior to this commit, and roughly 1800 of the prior, if it terminates in a script call and not an aip one direct, we'll be dialing that back until such time as fork fully fopcused on converting and resolving any lingering mismatches is completed.
This commit is contained in:
AzaezelX 2025-12-29 17:45:09 -06:00
parent e9205027f7
commit 5ffa3b81f1
84 changed files with 319 additions and 319 deletions

View file

@ -269,7 +269,7 @@ void GuiInspectorField::setWordData(const S32& wordIndex, const char* data, bool
if (mSpecialEditField)
{
if (mTargetObject != nullptr && mVariableName != StringTable->EmptyString())
if (mTargetObject != NULL && mVariableName != StringTable->EmptyString())
{
const char* fieldData = mTargetObject->getDataField(mVariableName, NULL);
const char* wordData = StringUnit::getUnit(fieldData, wordIndex, " \t\n");
@ -495,7 +495,7 @@ void GuiInspectorField::setData( const char* data, bool callbacks )
{
if (mSpecialEditField)
{
if (mTargetObject != nullptr && mVariableName != StringTable->EmptyString())
if (mTargetObject != NULL && mVariableName != StringTable->EmptyString())
{
mTargetObject->setDataField(mVariableName, NULL, data);
@ -645,7 +645,7 @@ const char* GuiInspectorField::getData( U32 inspectObjectIndex )
}
else
{
if (mTargetObject != nullptr && mVariableName != StringTable->EmptyString())
if (mTargetObject != NULL && mVariableName != StringTable->EmptyString())
{
return mTargetObject->getDataField(mVariableName, NULL);
}
@ -911,7 +911,7 @@ void GuiInspectorField::_registerEditControl(GuiControl* ctrl, StringTableEntry
ctrl->setInternalName(suffix);
char szName[512];
if (mInspector->getInspectObject() != nullptr)
if (mInspector->getInspectObject() != NULL)
dSprintf(szName, 512, "IE_%s_%d_%s_%s_Field", ctrl->getClassName(), mInspector->getInspectObject()->getId(), suffix, mCaption);
else
dSprintf(szName, 512, "IE_%s_%s_%s_Field", ctrl->getClassName(), suffix, mCaption);

View file

@ -696,7 +696,7 @@ void GuiInspectorGroup::addInspectorField(StringTableEntry name, StringTableEntr
else
fieldGui = constructField(fieldType);
if (fieldGui == nullptr)
if (fieldGui == NULL)
{
//call down into script and see if there's special handling for that type of field
//this allows us to have completely special-case field types implemented entirely in script
@ -750,7 +750,7 @@ void GuiInspectorGroup::removeInspectorField(StringTableEntry name)
{
GuiInspectorField* field = dynamic_cast<GuiInspectorField*>(mStack->getObject(i));
if (field == nullptr)
if (field == NULL)
continue;
if (field->getFieldName() == name || field->getSpecialEditVariableName() == name)
@ -764,7 +764,7 @@ void GuiInspectorGroup::removeInspectorField(StringTableEntry name)
void GuiInspectorGroup::hideInspectorField(StringTableEntry fieldName, bool setHidden)
{
SimObject* inspectObj = mParent->getInspectObject();
if (inspectObj == nullptr)
if (inspectObj == NULL)
return;
AbstractClassRep::Field* field = const_cast<AbstractClassRep::Field*>(inspectObj->getClassRep()->findField(fieldName));
@ -787,7 +787,7 @@ void GuiInspectorGroup::replaceInspectorField(StringTableEntry fieldName, GuiIns
{
GuiInspectorField* field = dynamic_cast<GuiInspectorField*>(mStack->getObject(i));
if (field == nullptr)
if (field == NULL)
continue;
if (field->getFieldName() == fieldName || field->getSpecialEditVariableName() == fieldName)
@ -878,7 +878,7 @@ DefineEngineMethod(GuiInspectorGroup, findField, S32, (const char* fieldName),,
return 0;
GuiInspectorField* field = object->findField(StringTable->insert(fieldName));
if (field == nullptr)
if (field == NULL)
return 0;
return field->getId();

View file

@ -97,7 +97,7 @@ bool GuiInspectorVariableField::onAdd()
void GuiInspectorVariableField::setData( const char* data, bool callbacks )
{
if (mOwnerObject == nullptr && mVariableName == StringTable->EmptyString())
if (mOwnerObject == NULL && mVariableName == StringTable->EmptyString())
{
if (!mCaption || mCaption[0] == 0)
return;
@ -106,7 +106,7 @@ void GuiInspectorVariableField::setData( const char* data, bool callbacks )
}
else
{
if (mOwnerObject != nullptr)
if (mOwnerObject != NULL)
{
//Special case: if our object is a Settings class, we'll assume that we're trying to get/set the fields via the Setting class's normal behavior
//otherwise, use fields as normal

View file

@ -72,7 +72,7 @@ void GuiVariableInspector::update()
for (U32 i = 0; i < mFields.size(); i++)
{
//first, get the var's group name. if the group exists, we'll add to it's list
GuiInspectorVariableGroup *group = nullptr;
GuiInspectorVariableGroup *group = NULL;
for (U32 g = 0; g < mGroups.size(); g++)
{
@ -83,7 +83,7 @@ void GuiVariableInspector::update()
}
}
if (group == nullptr)
if (group == NULL)
{
group = new GuiInspectorVariableGroup();
@ -164,7 +164,7 @@ void GuiVariableInspector::addField(const char* name, const char* label, const c
//establish the field on the ownerObject(if we have one)
//This way, we can let the field hook into the object's field and modify it when changed
if (newField->mOwnerObject != nullptr)
if (newField->mOwnerObject != NULL)
{
if (!newField->mOwnerObject->isField(newField->mFieldName))
{