variable naming cleanup due to locals overriding in multiple places. objectname to mObjectName+ getName() refs in dictionary.

This commit is contained in:
Azaezel 2018-03-12 02:36:52 -05:00
parent 78caec2718
commit 2e7d406860
3 changed files with 27 additions and 27 deletions

View file

@ -71,7 +71,7 @@ namespace Sim
SimObject::SimObject()
{
objectName = NULL;
mObjectName = NULL;
mOriginalName = NULL;
mInternalName = NULL;
nextNameObject = nullptr;
@ -128,10 +128,10 @@ SimObject::~SimObject()
AssertFatal(nextNameObject == nullptr,avar(
"SimObject::~SimObject: Not removed from dictionary: name %s, id %i",
objectName, mId));
mObjectName, mId));
AssertFatal(nextManagerNameObject == nullptr,avar(
"SimObject::~SimObject: Not removed from manager dictionary: name %s, id %i",
objectName,mId));
mObjectName,mId));
AssertFatal(mFlags.test(Added) == 0, "SimObject::object "
"missing call to SimObject::onRemove");
}
@ -149,7 +149,7 @@ void SimObject::initPersistFields()
{
addGroup( "Ungrouped" );
addProtectedField( "name", TypeName, Offset(objectName, SimObject), &setProtectedName, &defaultProtectedGetFn,
addProtectedField( "name", TypeName, Offset(mObjectName, SimObject), &setProtectedName, &defaultProtectedGetFn,
"Optional global name of this object." );
endGroup( "Ungrouped" );
@ -211,8 +211,8 @@ String SimObject::describeSelf() const
if( mId != 0 )
desc = avar( "%s|id: %i", desc.c_str(), mId );
if( objectName )
desc = avar( "%s|name: %s", desc.c_str(), objectName );
if(mObjectName)
desc = avar( "%s|name: %s", desc.c_str(), mObjectName);
if( mInternalName )
desc = avar( "%s|internal: %s", desc.c_str(), mInternalName );
if( mNameSpace )
@ -754,9 +754,9 @@ void SimObject::setId(SimObjectId newId)
void SimObject::assignName(const char *name)
{
if( objectName && !isNameChangeAllowed() )
if(mObjectName && !isNameChangeAllowed() )
{
Con::errorf( "SimObject::assignName - not allowed to change name of object '%s'", objectName );
Con::errorf( "SimObject::assignName - not allowed to change name of object '%s'", mObjectName);
return;
}
@ -781,7 +781,7 @@ void SimObject::assignName(const char *name)
Sim::gNameDictionary->remove( this );
}
objectName = newName;
mObjectName = newName;
if( mGroup )
mGroup->mNameDictionary.insert( this );
@ -1373,7 +1373,7 @@ SimObject::SimObject(const SimObject& other, bool temp_clone)
{
is_temp_clone = temp_clone;
objectName = other.objectName;
mObjectName = other.mObjectName;
mOriginalName = other.mOriginalName;
nextNameObject = other.nextNameObject;
nextManagerNameObject = other.nextManagerNameObject;