diff --git a/Engine/source/T3D/fx/fxFoliageReplicator.h b/Engine/source/T3D/fx/fxFoliageReplicator.h index e40554454..c9f8a0804 100644 --- a/Engine/source/T3D/fx/fxFoliageReplicator.h +++ b/Engine/source/T3D/fx/fxFoliageReplicator.h @@ -64,16 +64,16 @@ class fxFoliageItem { public: - MatrixF Transform; - F32 Width; - F32 Height; - Box3F FoliageBox; - bool Flipped; + MatrixF Transform; + F32 Width; + F32 Height; + Box3F FoliageBox; + bool Flipped; F32 SwayPhase; F32 SwayTimeRatio; - F32 LightPhase; + F32 LightPhase; F32 LightTimeRatio; - U32 LastFrameSerialID; + U32 LastFrameSerialID; }; //------------------------------------------------------------------------------ @@ -104,9 +104,9 @@ public: Box3F QuadrantBox; fxFoliageQuadrantNode* QuadrantChildNode[4]; Vector RenderList; - // Used in DrawIndexPrimitive call. - U32 startIndex; - U32 primitiveCount; + // Used in DrawIndexPrimitive call. + U32 startIndex; + U32 primitiveCount; }; @@ -152,7 +152,7 @@ protected: void CreateFoliage(void); void DestroyFoliage(void); - void DestroyFoliageItems(); + void DestroyFoliageItems(); void SyncFoliageReplicators(void); @@ -172,11 +172,11 @@ protected: Vector mReplicatedFoliage; fxFoliageRenderList mFrustumRenderSet; - GFXVertexBufferHandle mVertexBuffer; - GFXPrimitiveBufferHandle mPrimBuffer; + GFXVertexBufferHandle mVertexBuffer; + GFXPrimitiveBufferHandle mPrimBuffer; GFXShaderRef mShader; ShaderData* mShaderData; - GBitmap* mAlphaLookup; + GBitmap* mAlphaLookup; MRandomLCG RandomGen; F32 mFadeInGradient; @@ -193,8 +193,8 @@ protected: U32 mNextAllocatedNodeIdx; // Next Allocated Node Index. U32 mBillboardsAcquired; // Billboards Acquired. - // Used for alpha lookup in the pixel shader - GFXTexHandle mAlphaTexture; + // Used for alpha lookup in the pixel shader + GFXTexHandle mAlphaTexture; GFXStateBlockRef mPlacementSB; GFXStateBlockRef mRenderSB; @@ -223,15 +223,15 @@ protected: bool mDirty; - + void SetupShader(); - void SetupBuffers(); + void SetupBuffers(); void renderObject(ObjectRenderInst *ri, SceneRenderState *state, BaseMatInstance*); - void renderBuffers(SceneRenderState* state); - void renderArc(const F32 fRadiusX, const F32 fRadiusY); - void renderPlacementArea(const F32 ElapsedTime); - void renderQuad(fxFoliageQuadrantNode* quadNode, const MatrixF& RenderTransform, const bool UseDebug); - void computeAlphaTex(); + void renderBuffers(SceneRenderState* state); + void renderArc(const F32 fRadiusX, const F32 fRadiusY); + void renderPlacementArea(const F32 ElapsedTime); + void renderQuad(fxFoliageQuadrantNode* quadNode, const MatrixF& RenderTransform, const bool UseDebug); + void computeAlphaTex(); public: fxFoliageReplicator(); ~fxFoliageReplicator(); @@ -325,7 +325,7 @@ public: mUseDebugInfo = false; mDebugBoxHeight = 1.0f; mSeed = 1376312589; - mFoliageFile = StringTable->insert(""); + mFoliageFile = StringTable->EmptyString(); mFoliageTexture = GFXTexHandle(); mFoliageCount = 10; mFoliageRetries = 100; diff --git a/Engine/source/T3D/fx/fxShapeReplicator.h b/Engine/source/T3D/fx/fxShapeReplicator.h index 8cd9efa4e..e83f0e113 100644 --- a/Engine/source/T3D/fx/fxShapeReplicator.h +++ b/Engine/source/T3D/fx/fxShapeReplicator.h @@ -153,7 +153,7 @@ public: { // Set Defaults. mSeed = 1376312589; - mShapeFile = StringTable->insert(""); + mShapeFile = StringTable->EmptyString(); mShapeCount = 10; mShapeRetries = 100; mInnerRadiusX = 0; diff --git a/Engine/source/T3D/fx/precipitation.cpp b/Engine/source/T3D/fx/precipitation.cpp index 19855e26f..232e8ca72 100644 --- a/Engine/source/T3D/fx/precipitation.cpp +++ b/Engine/source/T3D/fx/precipitation.cpp @@ -129,10 +129,10 @@ PrecipitationData::PrecipitationData() { soundProfile = NULL; - mDropName = StringTable->insert(""); - mDropShaderName = StringTable->insert(""); - mSplashName = StringTable->insert(""); - mSplashShaderName = StringTable->insert(""); + mDropName = StringTable->EmptyString(); + mDropShaderName = StringTable->EmptyString(); + mSplashName = StringTable->EmptyString(); + mSplashShaderName = StringTable->EmptyString(); mDropsPerSide = 4; mSplashesPerSide = 2; diff --git a/Engine/source/T3D/fx/ribbon.cpp b/Engine/source/T3D/fx/ribbon.cpp index 6ebcfc932..ef5276857 100644 --- a/Engine/source/T3D/fx/ribbon.cpp +++ b/Engine/source/T3D/fx/ribbon.cpp @@ -57,7 +57,7 @@ RibbonData::RibbonData() mUseFadeOut = false; mFadeAwayStep = 0.032f; segmentsPerUpdate = 1; - mMatName = StringTable->insert(""); + mMatName = StringTable->EmptyString(); mTileScale = 1.0f; mFixedTexcoords = false; mSegmentSkipAmount = 0; @@ -318,7 +318,7 @@ void Ribbon::processTick(const Move* move) safeDeleteObject(); return; //} - //mSegmentPoints.pop_back(); + //mSegmentPoints.pop_back(); } @@ -456,7 +456,7 @@ void Ribbon::setShaderParams() { F32 length = (F32)mDataBlock->mRibbonLength; Point3F radius(numSegments / length, numSegments, length); MaterialParameters* matParams = mRibbonMat->getMaterialParameters(); - matParams->setSafe( mRadiusSC, radius ); + matParams->setSafe( mRadiusSC, radius ); } //-------------------------------------------------------------------------- diff --git a/Engine/source/T3D/missionMarker.cpp b/Engine/source/T3D/missionMarker.cpp index 3a043b095..1480e2f1f 100644 --- a/Engine/source/T3D/missionMarker.cpp +++ b/Engine/source/T3D/missionMarker.cpp @@ -225,7 +225,7 @@ ConsoleDocClass( WayPoint, WayPoint::WayPoint() { - mName = StringTable->insert(""); + mName = StringTable->EmptyString(); } void WayPoint::setHidden(bool hidden) @@ -256,7 +256,7 @@ void WayPoint::inspectPostApply() { Parent::inspectPostApply(); if(!mName || !mName[0]) - mName = StringTable->insert(""); + mName = StringTable->EmptyString(); setMaskBits(UpdateNameMask|UpdateTeamMask); } @@ -281,7 +281,7 @@ void WayPoint::unpackUpdate(NetConnection * con, BitStream * stream) void WayPoint::initPersistFields() { - addGroup("Misc"); + addGroup("Misc"); addField("markerName", TypeCaseString, Offset(mName, WayPoint), "Unique name representing this waypoint"); endGroup("Misc"); Parent::initPersistFields(); @@ -363,7 +363,7 @@ bool SpawnSphere::onAdd() if (!isGhost()) { - onAdd_callback( getId()); + onAdd_callback( getId()); if (mAutoSpawn) spawnObject(); @@ -527,7 +527,7 @@ ConsoleDocClass( CameraBookmark, CameraBookmark::CameraBookmark() { - mName = StringTable->insert(""); + mName = StringTable->EmptyString(); } bool CameraBookmark::onAdd() @@ -571,7 +571,7 @@ void CameraBookmark::inspectPostApply() { Parent::inspectPostApply(); if(!mName || !mName[0]) - mName = StringTable->insert(""); + mName = StringTable->EmptyString(); setMaskBits(UpdateNameMask); if( isMethod("onInspectPostApply") ) @@ -595,7 +595,7 @@ void CameraBookmark::unpackUpdate(NetConnection * con, BitStream * stream) void CameraBookmark::initPersistFields() { - //addGroup("Misc"); + //addGroup("Misc"); //addField("name", TypeCaseString, Offset(mName, CameraBookmark)); //endGroup("Misc"); diff --git a/Engine/source/T3D/player.cpp b/Engine/source/T3D/player.cpp index 93cd4f722..916a64c39 100644 --- a/Engine/source/T3D/player.cpp +++ b/Engine/source/T3D/player.cpp @@ -257,15 +257,15 @@ PlayerData::PlayerData() firstPersonShadows = false; // Used for third person image rendering - imageAnimPrefix = StringTable->insert(""); + imageAnimPrefix = StringTable->EmptyString(); allowImageStateAnimation = false; // Used for first person image rendering - imageAnimPrefixFP = StringTable->insert(""); + imageAnimPrefixFP = StringTable->EmptyString(); for (U32 i=0; iinsert(""); + shapeNameFP[i] = StringTable->EmptyString(); mCRCFP[i] = 0; mValidShapeFP[i] = false; } @@ -418,7 +418,7 @@ PlayerData::PlayerData() jumpTowardsNormal = true; - physicsPlayerType = StringTable->insert(""); + physicsPlayerType = StringTable->EmptyString(); dMemset( actionList, 0, sizeof(actionList) ); } @@ -6652,7 +6652,7 @@ DefineEngineMethod( Player, setActionThread, bool, ( const char* name, bool hold "@tsexample\n" "// Place the player in a sitting position after being mounted\n" "%player.setActionThread( \"sitting\", true, true );\n" - "@endtsexample\n") + "@endtsexample\n") { return object->setActionThread( name, hold, true, fsp); } @@ -6700,11 +6700,11 @@ DefineEngineMethod( Player, clearControlObject, void, (),, "Returns control to the player. This internally calls " "Player::setControlObject(0).\n" "@tsexample\n" - "%player.clearControlObject();\n" + "%player.clearControlObject();\n" "echo(%player.getControlObject()); //<-- Returns 0, player assumes control\n" "%player.setControlObject(%vehicle);\n" "echo(%player.getControlObject()); //<-- Returns %vehicle, player controls the vehicle now.\n" - "@endtsexample\n" + "@endtsexample\n" "@note If the player does not have a control object, the player will receive all moves " "from its GameConnection. If you're looking to remove control from the player itself " "(i.e. stop sending moves to the player) use GameConnection::setControlObject() to transfer " @@ -6762,63 +6762,63 @@ void Player::consoleInit() "@brief Determines if the player is rendered or not.\n\n" "Used on the client side to disable the rendering of all Player objects. This is " "mainly for the tools or debugging.\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::renderMyItems",TypeBool, &sRenderMyItems, "@brief Determines if mounted shapes are rendered or not.\n\n" "Used on the client side to disable the rendering of all Player mounted objects. This is " "mainly used for the tools or debugging.\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::renderCollision", TypeBool, &sRenderPlayerCollision, "@brief Determines if the player's collision mesh should be rendered.\n\n" "This is mainly used for the tools and debugging.\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::minWarpTicks",TypeF32,&sMinWarpTicks, "@brief Fraction of tick at which instant warp occures on the client.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::maxWarpTicks",TypeS32,&sMaxWarpTicks, "@brief When a warp needs to occur due to the client being too far off from the server, this is the " "maximum number of ticks we'll allow the client to warp to catch up.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::maxPredictionTicks",TypeS32,&sMaxPredictionTicks, "@brief Maximum number of ticks to predict on the client from the last known move obtained from the server.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::maxImpulseVelocity", TypeF32, &sMaxImpulseVelocity, "@brief The maximum velocity allowed due to a single impulse.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); // Move triggers Con::addVariable("$player::jumpTrigger", TypeS32, &sJumpTrigger, "@brief The move trigger index used for player jumping.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::crouchTrigger", TypeS32, &sCrouchTrigger, "@brief The move trigger index used for player crouching.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::proneTrigger", TypeS32, &sProneTrigger, "@brief The move trigger index used for player prone pose.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::sprintTrigger", TypeS32, &sSprintTrigger, "@brief The move trigger index used for player sprinting.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::imageTrigger0", TypeS32, &sImageTrigger0, "@brief The move trigger index used to trigger mounted image 0.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::imageTrigger1", TypeS32, &sImageTrigger1, "@brief The move trigger index used to trigger mounted image 1 or alternate fire " "on mounted image 0.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::jumpJetTrigger", TypeS32, &sJumpJetTrigger, "@brief The move trigger index used for player jump jetting.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); Con::addVariable("$player::vehicleDismountTrigger", TypeS32, &sVehicleDismountTrigger, "@brief The move trigger index used to dismount player.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); // ExtendedMove support Con::addVariable("$player::extendedMoveHeadPosRotIndex", TypeS32, &smExtendedMoveHeadPosRotIndex, "@brief The ExtendedMove position/rotation index used for head movements.\n\n" - "@ingroup GameObjects\n"); + "@ingroup GameObjects\n"); } //-------------------------------------------------------------------------- diff --git a/Engine/source/T3D/shapeBase.cpp b/Engine/source/T3D/shapeBase.cpp index 670446ab3..829a78bf6 100644 --- a/Engine/source/T3D/shapeBase.cpp +++ b/Engine/source/T3D/shapeBase.cpp @@ -152,13 +152,13 @@ ShapeBaseData::ShapeBaseData() shadowMaxVisibleDistance( 80.0f ), shadowProjectionDistance( 10.0f ), shadowSphereAdjust( 1.0f ), - shapeName( StringTable->insert("") ), - cloakTexName( StringTable->insert("") ), + shapeName( StringTable->EmptyString() ), + cloakTexName( StringTable->EmptyString() ), cubeDescId( 0 ), reflectorDesc( NULL ), debris( NULL ), debrisID( 0 ), - debrisShapeName( StringTable->insert("") ), + debrisShapeName( StringTable->EmptyString() ), explosion( NULL ), explosionID( 0 ), underwaterExplosion( NULL ), @@ -447,12 +447,12 @@ bool ShapeBaseData::_setMass( void* object, const char* index, const char* data { ShapeBaseData* shape = reinterpret_cast< ShapeBaseData* >( object ); - F32 mass = dAtof(data); + F32 mass = dAtof(data); - if (mass <= 0) - mass = 0.01f; + if (mass <= 0) + mass = 0.01f; - shape->mass = mass; + shape->mass = mass; return false; } @@ -935,8 +935,8 @@ ShapeBase::ShapeBase() mScriptThread[i].thread = 0; mScriptThread[i].state = Thread::Stop; mScriptThread[i].atEnd = false; - mScriptThread[i].timescale = 1.f; - mScriptThread[i].position = -1.f; + mScriptThread[i].timescale = 1.f; + mScriptThread[i].position = -1.f; } for (i = 0; i < MaxTriggerKeys; i++) @@ -1042,7 +1042,7 @@ bool ShapeBase::onAdd() } /* - if(mDataBlock->cloakTexName != StringTable->insert("")) + if(mDataBlock->cloakTexName != StringTable->EmptyString()) mCloakTexture = TextureHandle(mDataBlock->cloakTexName, MeshTexture, false); */ // Accumulation and environment mapping @@ -1512,8 +1512,8 @@ void ShapeBase::onCameraScopeQuery(NetConnection *cr, CameraScopeQuery * query) eyeTransform.getColumn(1, &query->orientation); // Get the visible distance. - if (getSceneManager() != NULL) - query->visibleDistance = getSceneManager()->getVisibleDistance(); + if (getSceneManager() != NULL) + query->visibleDistance = getSceneManager()->getVisibleDistance(); Parent::onCameraScopeQuery( cr, query ); } @@ -2154,18 +2154,18 @@ void ShapeBase::updateAudioPos() const char *ShapeBase::getThreadSequenceName( U32 slot ) { - Thread& st = mScriptThread[slot]; - if ( st.sequence == -1 ) - { - // Invalid Animation. - return ""; - } + Thread& st = mScriptThread[slot]; + if ( st.sequence == -1 ) + { + // Invalid Animation. + return ""; + } - // Name Index - const U32 nameIndex = getShape()->sequences[st.sequence].nameIndex; + // Name Index + const U32 nameIndex = getShape()->sequences[st.sequence].nameIndex; - // Return Name. - return getShape()->getName( nameIndex ); + // Return Name. + return getShape()->getName( nameIndex ); } bool ShapeBase::setThreadSequence(U32 slot, S32 seq, bool reset) @@ -2200,39 +2200,39 @@ bool ShapeBase::setThreadSequence(U32 slot, S32 seq, bool reset) void ShapeBase::updateThread(Thread& st) { - switch (st.state) - { - case Thread::Stop: - { - mShapeInstance->setTimeScale( st.thread, 1.f ); - mShapeInstance->setPos( st.thread, ( st.timescale > 0.f ) ? 1.0f : 0.0f ); - } // Drop through to pause state + switch (st.state) + { + case Thread::Stop: + { + mShapeInstance->setTimeScale( st.thread, 1.f ); + mShapeInstance->setPos( st.thread, ( st.timescale > 0.f ) ? 1.0f : 0.0f ); + } // Drop through to pause state - case Thread::Pause: - { - mShapeInstance->setTimeScale( st.thread, 0.f ); - } break; + case Thread::Pause: + { + mShapeInstance->setTimeScale( st.thread, 0.f ); + } break; - case Thread::Play: - { - if (st.atEnd) - { - mShapeInstance->setTimeScale(st.thread,1); - mShapeInstance->setPos( st.thread, ( st.timescale > 0.f ) ? 1.0f : 0.0f ); - mShapeInstance->setTimeScale(st.thread,0); + case Thread::Play: + { + if (st.atEnd) + { + mShapeInstance->setTimeScale(st.thread,1); + mShapeInstance->setPos( st.thread, ( st.timescale > 0.f ) ? 1.0f : 0.0f ); + mShapeInstance->setTimeScale(st.thread,0); st.state = Thread::Stop; - } - else - { - if ( st.position != -1.f ) - { - mShapeInstance->setTimeScale( st.thread, 1.f ); - mShapeInstance->setPos( st.thread, st.position ); - } + } + else + { + if ( st.position != -1.f ) + { + mShapeInstance->setTimeScale( st.thread, 1.f ); + mShapeInstance->setPos( st.thread, st.position ); + } - mShapeInstance->setTimeScale(st.thread, st.timescale ); - } - } break; + mShapeInstance->setTimeScale(st.thread, st.timescale ); + } + } break; case Thread::Destroy: { @@ -2244,7 +2244,7 @@ void ShapeBase::updateThread(Thread& st) st.thread = 0; } } break; - } + } } bool ShapeBase::stopThread(U32 slot) @@ -2297,50 +2297,50 @@ bool ShapeBase::playThread(U32 slot) bool ShapeBase::setThreadPosition( U32 slot, F32 pos ) { - Thread& st = mScriptThread[slot]; - if (st.sequence != -1) - { - setMaskBits(ThreadMaskN << slot); - st.position = pos; - st.atEnd = false; - updateThread(st); + Thread& st = mScriptThread[slot]; + if (st.sequence != -1) + { + setMaskBits(ThreadMaskN << slot); + st.position = pos; + st.atEnd = false; + updateThread(st); - return true; - } - return false; + return true; + } + return false; } bool ShapeBase::setThreadDir(U32 slot,bool forward) { - Thread& st = mScriptThread[slot]; - if (st.sequence != -1) - { - if ( ( st.timescale >= 0.f ) != forward ) - { - setMaskBits(ThreadMaskN << slot); - st.timescale *= -1.f ; - st.atEnd = false; - updateThread(st); - } - return true; - } - return false; + Thread& st = mScriptThread[slot]; + if (st.sequence != -1) + { + if ( ( st.timescale >= 0.f ) != forward ) + { + setMaskBits(ThreadMaskN << slot); + st.timescale *= -1.f ; + st.atEnd = false; + updateThread(st); + } + return true; + } + return false; } bool ShapeBase::setThreadTimeScale( U32 slot, F32 timeScale ) { - Thread& st = mScriptThread[slot]; - if (st.sequence != -1) - { - if (st.timescale != timeScale) - { - setMaskBits(ThreadMaskN << slot); - st.timescale = timeScale; - updateThread(st); - } - return true; - } - return false; + Thread& st = mScriptThread[slot]; + if (st.sequence != -1) + { + if (st.timescale != timeScale) + { + setMaskBits(ThreadMaskN << slot); + st.timescale = timeScale; + updateThread(st); + } + return true; + } + return false; } void ShapeBase::advanceThreads(F32 dt) @@ -2349,7 +2349,7 @@ void ShapeBase::advanceThreads(F32 dt) Thread& st = mScriptThread[i]; if (st.thread) { if (!mShapeInstance->getShape()->sequences[st.sequence].isCyclic() && !st.atEnd && - ( ( st.timescale > 0.f )? mShapeInstance->getPos(st.thread) >= 1.0: + ( ( st.timescale > 0.f )? mShapeInstance->getPos(st.thread) >= 1.0: mShapeInstance->getPos(st.thread) <= 0)) { st.atEnd = true; updateThread(st); @@ -4392,7 +4392,7 @@ DefineEngineMethod( ShapeBase, isEnabled, bool, (),, DefineEngineMethod(ShapeBase, blowUp, void, (),, "@brief Explodes an object into pieces.") { - object->blowUp(); + object->blowUp(); } DefineEngineMethod( ShapeBase, applyDamage, void, ( F32 amount ),, @@ -4696,22 +4696,22 @@ void ShapeBase::consoleInit() "@see ShapeBase::setDamageFlash()\n" "@see ShapeBase::getDamageFlash()\n" "@note Relies on the flash postFx.\n" - "@ingroup gameObjects\n"); + "@ingroup gameObjects\n"); Con::addVariable("SB::WODec", TypeF32, &sWhiteoutDec, "Speed to reduce the whiteout effect per tick.\n\n" "@see ShapeBase::setWhiteOut()\n" "@see ShapeBase::getWhiteOut" "@note Relies on the flash postFx.\n" - "@ingroup gameObjects\n"); + "@ingroup gameObjects\n"); Con::addVariable("SB::FullCorrectionDistance", TypeF32, &sFullCorrectionDistance, "@brief Distance at which a weapon's muzzle vector is fully corrected to match where the player is looking.\n\n" "When a weapon image has correctMuzzleVector set and the Player is in 1st person, the muzzle vector from the " "weapon is modified to match where the player is looking. Beyond the FullCorrectionDistance the muzzle vector " "is always corrected. Between FullCorrectionDistance and the player, the weapon's muzzle vector is adjusted so that " "the closer the aim point is to the player, the closer the muzzle vector is to the true (non-corrected) one.\n" - "@ingroup gameObjects\n"); + "@ingroup gameObjects\n"); Con::addVariable("SB::CloakSpeed", TypeF32, &sCloakSpeed, "@brief Time to cloak, in seconds.\n\n" - "@ingroup gameObjects\n"); + "@ingroup gameObjects\n"); } void ShapeBase::_updateHiddenMeshes() @@ -4832,17 +4832,17 @@ DefineEngineMethod( ShapeBase, getTargetName, const char*, ( S32 index ),, "@see getTargetCount()\n") { - ShapeBase *obj = dynamic_cast< ShapeBase* > ( object ); - if(obj) - { - // Try to use the client object (so we get the reskinned targets in the Material Editor) - if ((ShapeBase*)obj->getClientObject()) - obj = (ShapeBase*)obj->getClientObject(); + ShapeBase *obj = dynamic_cast< ShapeBase* > ( object ); + if(obj) + { + // Try to use the client object (so we get the reskinned targets in the Material Editor) + if ((ShapeBase*)obj->getClientObject()) + obj = (ShapeBase*)obj->getClientObject(); - return obj->getShapeInstance()->getTargetName(index); - } + return obj->getShapeInstance()->getTargetName(index); + } - return ""; + return ""; } DefineEngineMethod( ShapeBase, getTargetCount, S32, (),, @@ -4861,7 +4861,7 @@ DefineEngineMethod( ShapeBase, getTargetCount, S32, (),, if (obj->getShapeInstance() != NULL) return obj->getShapeInstance()->getTargetCount(); - } + } return -1; } @@ -4938,10 +4938,10 @@ DefineEngineMethod( ShapeBase, getModelFile, const char *, (),, "@return the shape filename\n\n" ) { - GameBaseData * datablock = object->getDataBlock(); - if( !datablock ) - return String::EmptyString; + GameBaseData * datablock = object->getDataBlock(); + if( !datablock ) + return String::EmptyString; - const char *fieldName = StringTable->insert( String("shapeFile") ); + const char *fieldName = StringTable->insert( String("shapeFile") ); return datablock->getDataField( fieldName, NULL ); } diff --git a/Engine/source/console/SimXMLDocument.cpp b/Engine/source/console/SimXMLDocument.cpp index 840f36ca8..b2960105b 100644 --- a/Engine/source/console/SimXMLDocument.cpp +++ b/Engine/source/console/SimXMLDocument.cpp @@ -49,40 +49,40 @@ ConsoleDocClass( SimXMLDocument, "// Thanks to Rex Hiebert for this example\n" "// Given the following XML\n" "\n" - "\n" - " \n" - " Triangle\n" - " Square\n" - " Circle\n" - "
\n" - " \n" - " Pyramid\n" - " Cube\n" - " Sphere\n" - "
\n" - "
\n\n" + "\n" + " \n" + " Triangle\n" + " Square\n" + " Circle\n" + "
\n" + " \n" + " Pyramid\n" + " Cube\n" + " Sphere\n" + "
\n" + "
\n\n" "// Using SimXMLDocument by itself\n" "function readXmlExample(%filename)\n" - "{\n" - " %xml = new SimXMLDocument() {};\n" - " %xml.loadFile(%filename);\n\n" - " %xml.pushChildElement(\"DataTables\");\n" - " %xml.pushFirstChildElement(\"table\");\n" - " while(true)\n" - " {\n" - " echo(\"TABLE:\" SPC %xml.attribute(\"tableName\"));\n" - " %xml.pushFirstChildElement(\"rec\");\n" - " while (true)\n" - " {\n" - " %id = %xml.attribute(\"id\");\n" - " %desc = %xml.getData();\n" - " echo(\" Shape\" SPC %id SPC %desc);\n" - " if (!%xml.nextSiblingElement(\"rec\")) break;\n" - " }\n" - " %xml.popElement();\n" - " if (!%xml.nextSiblingElement(\"table\")) break;\n" - " }\n" - "}\n\n" + "{\n" + " %xml = new SimXMLDocument() {};\n" + " %xml.loadFile(%filename);\n\n" + " %xml.pushChildElement(\"DataTables\");\n" + " %xml.pushFirstChildElement(\"table\");\n" + " while(true)\n" + " {\n" + " echo(\"TABLE:\" SPC %xml.attribute(\"tableName\"));\n" + " %xml.pushFirstChildElement(\"rec\");\n" + " while (true)\n" + " {\n" + " %id = %xml.attribute(\"id\");\n" + " %desc = %xml.getData();\n" + " echo(\" Shape\" SPC %id SPC %desc);\n" + " if (!%xml.nextSiblingElement(\"rec\")) break;\n" + " }\n" + " %xml.popElement();\n" + " if (!%xml.nextSiblingElement(\"table\")) break;\n" + " }\n" + "}\n\n" "// Thanks to Scott Peal for this example\n" "// Using FileObject in conjunction with SimXMLDocument\n" @@ -90,45 +90,45 @@ ConsoleDocClass( SimXMLDocument, "// \n" "// \n" "// \n" - "function getModelsInCatagory()\n" - "{\n" - " %file = \"./Catalog.xml\";\n" - " %fo = new FileObject();\n" - " %text = \"\";\n\n" - " if(%fo.openForRead(%file))\n" - " {\n" - " while(!%fo.isEOF())\n" - " {\n" - " %text = %text @ %fo.readLine();\n" - " if (!%fo.isEOF()) %text = %text @ \"\\n\";\n" - " }\n" - " }\n" - " else\n" - " {\n" - " echo(\"Unable to locate the file: \" @ %file);\n" - " }\n\n" - " %fo.delete();\n\n" - " %xml = new SimXMLDocument() {};\n" - " %xml.parse(%text);\n" - " // \"Get\" inside of the root element, \"Models\".\n" - " %xml.pushChildElement(0);\n\n" - " // \"Get\" into the first child element\n" - " if (%xml.pushFirstChildElement(\"Model\"))\n" - " {\n" - " while (true)\n" - " {\n" - " // \n" - " // Here, i read the element's attributes.\n" - " // You might want to save these values in an array or call the %xml.getElementValue()\n" - " // if you have a different XML structure.\n\n" - " %catagory = %xml.attribute(\"catagory\");\n" - " %name = %xml.attribute(\"name\");\n" - " %path = %xml.attribute(\"path\");\n\n" - " // now, read the next \"Model\"\n" - " if (!%xml.nextSiblingElement(\"Model\")) break;\n" - " }\n" - " }\n" - "}\n" + "function getModelsInCatagory()\n" + "{\n" + " %file = \"./Catalog.xml\";\n" + " %fo = new FileObject();\n" + " %text = \"\";\n\n" + " if(%fo.openForRead(%file))\n" + " {\n" + " while(!%fo.isEOF())\n" + " {\n" + " %text = %text @ %fo.readLine();\n" + " if (!%fo.isEOF()) %text = %text @ \"\\n\";\n" + " }\n" + " }\n" + " else\n" + " {\n" + " echo(\"Unable to locate the file: \" @ %file);\n" + " }\n\n" + " %fo.delete();\n\n" + " %xml = new SimXMLDocument() {};\n" + " %xml.parse(%text);\n" + " // \"Get\" inside of the root element, \"Models\".\n" + " %xml.pushChildElement(0);\n\n" + " // \"Get\" into the first child element\n" + " if (%xml.pushFirstChildElement(\"Model\"))\n" + " {\n" + " while (true)\n" + " {\n" + " // \n" + " // Here, i read the element's attributes.\n" + " // You might want to save these values in an array or call the %xml.getElementValue()\n" + " // if you have a different XML structure.\n\n" + " %catagory = %xml.attribute(\"catagory\");\n" + " %name = %xml.attribute(\"name\");\n" + " %path = %xml.attribute(\"path\");\n\n" + " // now, read the next \"Model\"\n" + " if (!%xml.nextSiblingElement(\"Model\")) break;\n" + " }\n" + " }\n" + "}\n" "@endtsexample\n\n" "@note SimXMLDocument is a wrapper around TinyXml, a standard XML library. If you're familiar " @@ -504,13 +504,13 @@ const char* SimXMLDocument::elementValue() { if(m_paNode.empty()) { - return StringTable->insert(""); + return StringTable->EmptyString(); } const S32 iLastElement = m_paNode.size() - 1; TiXmlElement* pNode = m_paNode[iLastElement]; if(!pNode) { - return StringTable->insert(""); + return StringTable->EmptyString(); } return pNode->Value(); @@ -545,18 +545,18 @@ const char* SimXMLDocument::attribute(const char* rAttribute) { if(m_paNode.empty()) { - return StringTable->insert(""); + return StringTable->EmptyString(); } const S32 iLastElement = m_paNode.size() - 1; TiXmlElement* pNode = m_paNode[iLastElement]; if(!pNode) { - return StringTable->insert(""); + return StringTable->EmptyString(); } if(!pNode->Attribute(rAttribute)) { - return StringTable->insert(""); + return StringTable->EmptyString(); } return pNode->Attribute(rAttribute); @@ -629,20 +629,20 @@ const char* SimXMLDocument::firstAttribute() // Get the current element if(m_paNode.empty()) { - return StringTable->insert(""); + return StringTable->EmptyString(); } const S32 iLastElement = m_paNode.size() - 1; TiXmlElement* pNode = m_paNode[iLastElement]; if(!pNode) { - return StringTable->insert(""); + return StringTable->EmptyString(); } // Gets its first attribute, if any m_CurrentAttribute = pNode->FirstAttribute(); if(!m_CurrentAttribute) { - return StringTable->insert(""); + return StringTable->EmptyString(); } return m_CurrentAttribute->Name(); @@ -666,20 +666,20 @@ const char* SimXMLDocument::lastAttribute() // Get the current element if(m_paNode.empty()) { - return StringTable->insert(""); + return StringTable->EmptyString(); } const S32 iLastElement = m_paNode.size() - 1; TiXmlElement* pNode = m_paNode[iLastElement]; if(!pNode) { - return StringTable->insert(""); + return StringTable->EmptyString(); } // Gets its last attribute, if any m_CurrentAttribute = pNode->LastAttribute(); if(!m_CurrentAttribute) { - return StringTable->insert(""); + return StringTable->EmptyString(); } return m_CurrentAttribute->Name(); @@ -703,14 +703,14 @@ const char* SimXMLDocument::nextAttribute() { if(!m_CurrentAttribute) { - return StringTable->insert(""); + return StringTable->EmptyString(); } // Gets its next attribute, if any m_CurrentAttribute = m_CurrentAttribute->Next(); if(!m_CurrentAttribute) { - return StringTable->insert(""); + return StringTable->EmptyString(); } return m_CurrentAttribute->Name(); @@ -734,14 +734,14 @@ const char* SimXMLDocument::prevAttribute() { if(!m_CurrentAttribute) { - return StringTable->insert(""); + return StringTable->EmptyString(); } // Gets its next attribute, if any m_CurrentAttribute = m_CurrentAttribute->Previous(); if(!m_CurrentAttribute) { - return StringTable->insert(""); + return StringTable->EmptyString(); } return m_CurrentAttribute->Name(); diff --git a/Engine/source/console/astAlloc.cpp b/Engine/source/console/astAlloc.cpp index 19809a1e2..fb69f49d5 100644 --- a/Engine/source/console/astAlloc.cpp +++ b/Engine/source/console/astAlloc.cpp @@ -411,7 +411,7 @@ ObjectDeclNode *ObjectDeclNode::alloc( S32 lineNumber, ExprNode *classNameExpr, if(parentObject) ret->parentObject = parentObject; else - ret->parentObject = StringTable->insert(""); + ret->parentObject = StringTable->EmptyString(); return ret; } diff --git a/Engine/source/console/codeBlock.cpp b/Engine/source/console/codeBlock.cpp index 1559f41d8..192b50f0f 100644 --- a/Engine/source/console/codeBlock.cpp +++ b/Engine/source/console/codeBlock.cpp @@ -435,7 +435,7 @@ bool CodeBlock::read(StringTableEntry fileName, Stream &st) if(offset < globalSize) ste = StringTable->insert(globalStrings + offset); else - ste = StringTable->insert(""); + ste = StringTable->EmptyString(); U32 count; st.read(&count); while(count--) @@ -455,8 +455,8 @@ bool CodeBlock::read(StringTableEntry fileName, Stream &st) bool CodeBlock::compile(const char *codeFileName, StringTableEntry fileName, const char *inScript, bool overrideNoDso) { - AssertFatal(Con::isMainThread(), "Compiling code on a secondary thread"); - + AssertFatal(Con::isMainThread(), "Compiling code on a secondary thread"); + // This will return true, but return value is ignored char *script; chompUTF8BOM( inScript, &script ); @@ -572,8 +572,8 @@ bool CodeBlock::compile(const char *codeFileName, StringTableEntry fileName, con ConsoleValueRef CodeBlock::compileExec(StringTableEntry fileName, const char *inString, bool noCalls, S32 setFrame) { - AssertFatal(Con::isMainThread(), "Compiling code on a secondary thread"); - + AssertFatal(Con::isMainThread(), "Compiling code on a secondary thread"); + // Check for a UTF8 script file char *string; chompUTF8BOM( inString, &string ); diff --git a/Engine/source/console/fieldBrushObject.cpp b/Engine/source/console/fieldBrushObject.cpp index 484178dec..407a57cb3 100644 --- a/Engine/source/console/fieldBrushObject.cpp +++ b/Engine/source/console/fieldBrushObject.cpp @@ -41,8 +41,8 @@ ConsoleDocClass( FieldBrushObject, FieldBrushObject::FieldBrushObject() { // Reset Description. - mDescription = StringTable->insert(""); - mSortName = StringTable->insert(""); + mDescription = StringTable->EmptyString(); + mSortName = StringTable->EmptyString(); } diff --git a/Engine/source/console/persistenceManager.cpp b/Engine/source/console/persistenceManager.cpp index 7db907475..c4af549ed 100644 --- a/Engine/source/console/persistenceManager.cpp +++ b/Engine/source/console/persistenceManager.cpp @@ -328,7 +328,7 @@ void PersistenceManager::parseObject() if (mParser.tokenICmp(")")) { - mCurrentObject->name = StringTable->insert(""); + mCurrentObject->name = StringTable->EmptyString(); mCurrentObject->nameLine = mParser.getCurrentLine(); mCurrentObject->namePosition = mParser.getTokenLineOffset(); diff --git a/Engine/source/gui/buttons/guiIconButtonCtrl.cpp b/Engine/source/gui/buttons/guiIconButtonCtrl.cpp index f37d69a4c..e9d654d2a 100644 --- a/Engine/source/gui/buttons/guiIconButtonCtrl.cpp +++ b/Engine/source/gui/buttons/guiIconButtonCtrl.cpp @@ -85,7 +85,7 @@ ConsoleDocClass( GuiIconButtonCtrl, GuiIconButtonCtrl::GuiIconButtonCtrl() { - mBitmapName = StringTable->insert(""); + mBitmapName = StringTable->EmptyString(); mTextLocation = TextLocLeft; mIconLocation = IconLocLeft; mTextMargin = 4; @@ -94,7 +94,7 @@ GuiIconButtonCtrl::GuiIconButtonCtrl() mFitBitmapToButton = false; mMakeIconSquare = false; - mErrorBitmapName = StringTable->insert(""); + mErrorBitmapName = StringTable->EmptyString(); mErrorTextureHandle = NULL; mAutoSize = false; diff --git a/Engine/source/gui/buttons/guiToggleButtonCtrl.cpp b/Engine/source/gui/buttons/guiToggleButtonCtrl.cpp index 7168f58ca..a2aaaa6c9 100644 --- a/Engine/source/gui/buttons/guiToggleButtonCtrl.cpp +++ b/Engine/source/gui/buttons/guiToggleButtonCtrl.cpp @@ -49,7 +49,7 @@ ConsoleDocClass( GuiToggleButtonCtrl, GuiToggleButtonCtrl::GuiToggleButtonCtrl() { setExtent(140, 30); - mButtonText = StringTable->insert(""); + mButtonText = StringTable->EmptyString(); mStateOn = false; mButtonType = ButtonTypeCheck; } diff --git a/Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp b/Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp index 9242d8aff..ad65b5782 100644 --- a/Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp +++ b/Engine/source/gui/buttons/guiToolboxButtonCtrl.cpp @@ -43,7 +43,7 @@ ConsoleDocClass( GuiToolboxButtonCtrl, //------------------------------------- GuiToolboxButtonCtrl::GuiToolboxButtonCtrl() { - mNormalBitmapName = StringTable->insert(""); + mNormalBitmapName = StringTable->EmptyString(); mLoweredBitmapName = StringTable->insert("sceneeditor/client/images/buttondown"); mHoverBitmapName = StringTable->insert("sceneeditor/client/images/buttonup"); setMinExtent(Point2I(16,16)); @@ -225,4 +225,4 @@ void GuiToolboxButtonCtrl::renderButton(GFXTexHandle &texture, Point2I &offset, GFX->getDrawUtil()->drawBitmap(texture, finalOffset); renderChildControls( offset, updateRect); } -} \ No newline at end of file +} diff --git a/Engine/source/gui/containers/guiFormCtrl.cpp b/Engine/source/gui/containers/guiFormCtrl.cpp index bbd9a7f9e..f94e6c234 100644 --- a/Engine/source/gui/containers/guiFormCtrl.cpp +++ b/Engine/source/gui/containers/guiFormCtrl.cpp @@ -50,8 +50,8 @@ GuiFormCtrl::GuiFormCtrl() mCaption = "[none]"; mUseSmallCaption = false; - mContentLibrary = StringTable->insert(""); - mContent = StringTable->insert(""); + mContentLibrary = StringTable->EmptyString(); + mContent = StringTable->EmptyString(); mCanSaveFieldDictionary = true; mIsContainer = true; @@ -213,7 +213,7 @@ bool GuiFormCtrl::resize(const Point2I &newPosition, const Point2I &newExtent) static char buf[256]; mUseSmallCaption = true; - mSmallCaption = StringTable->insert(""); + mSmallCaption = StringTable->EmptyString(); S32 strlen = dStrlen((const char*)mCaption); for(S32 i=strlen; i>=0; --i) diff --git a/Engine/source/gui/containers/guiPaneCtrl.cpp b/Engine/source/gui/containers/guiPaneCtrl.cpp index c42fc9e51..4d2ae5e61 100644 --- a/Engine/source/gui/containers/guiPaneCtrl.cpp +++ b/Engine/source/gui/containers/guiPaneCtrl.cpp @@ -68,7 +68,7 @@ GuiPaneControl::GuiPaneControl() mMouseOver = false; mDepressed = false; mCaption = "A Pane"; - mCaptionID = StringTable->insert(""); + mCaptionID = StringTable->EmptyString(); mIsContainer = true; mOriginalExtents.set(10,10); diff --git a/Engine/source/gui/containers/guiWindowCtrl.cpp b/Engine/source/gui/containers/guiWindowCtrl.cpp index 2957ec7ec..df8838fa1 100644 --- a/Engine/source/gui/containers/guiWindowCtrl.cpp +++ b/Engine/source/gui/containers/guiWindowCtrl.cpp @@ -1512,7 +1512,7 @@ void GuiWindowCtrl::setCloseCommand(const char *newCmd) if (newCmd) mCloseCommand = StringTable->insert(newCmd); else - mCloseCommand = StringTable->insert(""); + mCloseCommand = StringTable->EmptyString(); } //----------------------------------------------------------------------------- diff --git a/Engine/source/gui/controls/guiGameListMenuCtrl.cpp b/Engine/source/gui/controls/guiGameListMenuCtrl.cpp index 760a0246a..e64f2c7c0 100644 --- a/Engine/source/gui/controls/guiGameListMenuCtrl.cpp +++ b/Engine/source/gui/controls/guiGameListMenuCtrl.cpp @@ -38,7 +38,7 @@ GuiGameListMenuCtrl::GuiGameListMenuCtrl() VECTOR_SET_ASSOCIATION(mRows); // initialize the control callbacks - mCallbackOnA = StringTable->insert(""); + mCallbackOnA = StringTable->EmptyString(); mCallbackOnB = mCallbackOnA; mCallbackOnX = mCallbackOnA; mCallbackOnY = mCallbackOnA; @@ -572,7 +572,7 @@ StringTableEntry GuiGameListMenuCtrl::getRowLabel(S32 rowIndex) const if (! isValidRowIndex(rowIndex)) { // not a valid row index, don't do anything - return StringTable->insert(""); + return StringTable->EmptyString(); } return mRows[rowIndex]->mLabel; } diff --git a/Engine/source/gui/controls/guiListBoxCtrl.cpp b/Engine/source/gui/controls/guiListBoxCtrl.cpp index 5deab67fc..992d64903 100644 --- a/Engine/source/gui/controls/guiListBoxCtrl.cpp +++ b/Engine/source/gui/controls/guiListBoxCtrl.cpp @@ -1530,7 +1530,7 @@ void GuiListBoxCtrl::_mirror() StringTableEntry GuiListBoxCtrl::_makeMirrorItemName( SimObject *inObj ) { - StringTableEntry outName = StringTable->insert(""); + StringTableEntry outName = StringTable->EmptyString(); if ( mMakeNameCallback.isNotEmpty() ) { @@ -1634,4 +1634,4 @@ void GuiListBoxCtrl::removeFilteredItem( String item ) break; } } -} \ No newline at end of file +} diff --git a/Engine/source/gui/controls/guiMLTextCtrl.cpp b/Engine/source/gui/controls/guiMLTextCtrl.cpp index 6cfdf4354..e61a82cc5 100644 --- a/Engine/source/gui/controls/guiMLTextCtrl.cpp +++ b/Engine/source/gui/controls/guiMLTextCtrl.cpp @@ -251,7 +251,7 @@ GuiMLTextCtrl::GuiMLTextCtrl() mIsEditCtrl( false ), mCursorPosition( false ), mMaxBufferSize( -1 ), - mInitialText( StringTable->insert("") ), + mInitialText( StringTable->EmptyString() ), mSelectionActive( false ), mSelectionStart( 0 ), mSelectionEnd( 0 ), @@ -267,7 +267,7 @@ GuiMLTextCtrl::GuiMLTextCtrl() mFontList( NULL ) { mActive = true; - //mInitialText = StringTable->insert(""); + //mInitialText = StringTable->EmptyString(); Sim::findObject("InputDeniedSound", mDeniedSound); } diff --git a/Engine/source/gui/controls/guiPopUpCtrl.cpp b/Engine/source/gui/controls/guiPopUpCtrl.cpp index beb9fbcc8..af172221a 100644 --- a/Engine/source/gui/controls/guiPopUpCtrl.cpp +++ b/Engine/source/gui/controls/guiPopUpCtrl.cpp @@ -277,7 +277,7 @@ GuiPopUpMenuCtrl::GuiPopUpMenuCtrl(void) mRenderScrollInNA = false; // Added mBackgroundCancel = false; // Added mReverseTextList = false; // Added - Don't reverse text list if displaying up - mBitmapName = StringTable->insert(""); // Added + mBitmapName = StringTable->EmptyString(); // Added mBitmapBounds.set(16, 16); // Added mIdMax = -1; } diff --git a/Engine/source/gui/controls/guiPopUpCtrlEx.cpp b/Engine/source/gui/controls/guiPopUpCtrlEx.cpp index 510576f8a..3c6415117 100644 --- a/Engine/source/gui/controls/guiPopUpCtrlEx.cpp +++ b/Engine/source/gui/controls/guiPopUpCtrlEx.cpp @@ -328,7 +328,7 @@ GuiPopUpMenuCtrlEx::GuiPopUpMenuCtrlEx(void) mRenderScrollInNA = false; // Added mBackgroundCancel = false; // Added mReverseTextList = false; // Added - Don't reverse text list if displaying up - mBitmapName = StringTable->insert(""); // Added + mBitmapName = StringTable->EmptyString(); // Added mBitmapBounds.set(16, 16); // Added mHotTrackItems = false; mIdMax = -1; diff --git a/Engine/source/gui/controls/guiTextCtrl.cpp b/Engine/source/gui/controls/guiTextCtrl.cpp index e8c9057f1..8759e3973 100644 --- a/Engine/source/gui/controls/guiTextCtrl.cpp +++ b/Engine/source/gui/controls/guiTextCtrl.cpp @@ -54,8 +54,8 @@ ConsoleDocClass( GuiTextCtrl, GuiTextCtrl::GuiTextCtrl() { //default fonts - mInitialText = StringTable->insert(""); - mInitialTextID = StringTable->insert(""); + mInitialText = StringTable->EmptyString(); + mInitialTextID = StringTable->EmptyString(); mText[0] = '\0'; mMaxStrLen = GuiTextCtrl::MAX_STRING_LENGTH; } diff --git a/Engine/source/gui/controls/guiTextEditCtrl.cpp b/Engine/source/gui/controls/guiTextEditCtrl.cpp index 9084e8d8d..968fe17a6 100644 --- a/Engine/source/gui/controls/guiTextEditCtrl.cpp +++ b/Engine/source/gui/controls/guiTextEditCtrl.cpp @@ -1684,7 +1684,7 @@ DefineEngineMethod( GuiTextEditCtrl, getText, const char*, (),, "@see GuiControl") { if( !object->hasText() ) - return StringTable->insert(""); + return StringTable->EmptyString(); char *retBuffer = Con::getReturnBuffer( GuiTextEditCtrl::MAX_STRING_LENGTH ); object->getText( retBuffer ); diff --git a/Engine/source/gui/controls/guiTreeViewCtrl.cpp b/Engine/source/gui/controls/guiTreeViewCtrl.cpp index e1b20ad5f..e4fb9ab00 100644 --- a/Engine/source/gui/controls/guiTreeViewCtrl.cpp +++ b/Engine/source/gui/controls/guiTreeViewCtrl.cpp @@ -845,7 +845,7 @@ GuiTreeViewCtrl::GuiTreeViewCtrl() mClearAllOnSingleSelection = true; - mBitmapBase = StringTable->insert(""); + mBitmapBase = StringTable->EmptyString(); mTexRollover = NULL; mTexSelected = NULL; @@ -4746,13 +4746,13 @@ StringTableEntry GuiTreeViewCtrl::getTextToRoot( S32 itemId, const char * delimi if(!item) { Con::errorf(ConsoleLogEntry::General, "GuiTreeViewCtrl::getTextToRoot: invalid start item id!"); - return StringTable->insert(""); + return StringTable->EmptyString(); } if(item->isInspectorData()) { Con::errorf(ConsoleLogEntry::General, "GuiTreeViewCtrl::getTextToRoot: cannot get text to root of inspector data items"); - return StringTable->insert(""); + return StringTable->EmptyString(); } char bufferOne[1024]; diff --git a/Engine/source/gui/editor/guiParticleGraphCtrl.cpp b/Engine/source/gui/editor/guiParticleGraphCtrl.cpp index 8e20bfeef..68ecf81c4 100644 --- a/Engine/source/gui/editor/guiParticleGraphCtrl.cpp +++ b/Engine/source/gui/editor/guiParticleGraphCtrl.cpp @@ -50,7 +50,7 @@ GuiParticleGraphCtrl::GuiParticleGraphCtrl() mPlots[i].mGraphMin.x = 0; mPlots[i].mGraphMin.y = 0; mPlots[i].mGraphType = Polyline; - mPlots[i].mGraphName = StringTable->insert(""); + mPlots[i].mGraphName = StringTable->EmptyString(); mPlots[i].mHidden = false; mPlots[i].mGraphScale = 0.05f; } diff --git a/Engine/source/gui/game/guiChunkedBitmapCtrl.cpp b/Engine/source/gui/game/guiChunkedBitmapCtrl.cpp index 2b122f540..d0f9549e1 100644 --- a/Engine/source/gui/game/guiChunkedBitmapCtrl.cpp +++ b/Engine/source/gui/game/guiChunkedBitmapCtrl.cpp @@ -86,7 +86,7 @@ DefineEngineMethod( GuiChunkedBitmapCtrl, setBitmap, void, (const char* filename GuiChunkedBitmapCtrl::GuiChunkedBitmapCtrl() { - mBitmapName = StringTable->insert(""); + mBitmapName = StringTable->EmptyString(); mUseVariable = false; mTile = false; } diff --git a/Engine/source/gui/worldEditor/undoActions.cpp b/Engine/source/gui/worldEditor/undoActions.cpp index 94495d89e..d88b72bcd 100644 --- a/Engine/source/gui/worldEditor/undoActions.cpp +++ b/Engine/source/gui/worldEditor/undoActions.cpp @@ -218,8 +218,8 @@ InspectorFieldUndoAction::InspectorFieldUndoAction() { mObjId = 0; mField = NULL; - mSlotName = StringTable->insert(""); - mArrayIdx = StringTable->insert(""); + mSlotName = StringTable->EmptyString(); + mArrayIdx = StringTable->EmptyString(); } InspectorFieldUndoAction::InspectorFieldUndoAction( const UTF8 *actionName ) @@ -228,8 +228,8 @@ InspectorFieldUndoAction::InspectorFieldUndoAction( const UTF8 *actionName ) mInspector = NULL; mObjId = 0; mField = NULL; - mSlotName = StringTable->insert(""); - mArrayIdx = StringTable->insert(""); + mSlotName = StringTable->EmptyString(); + mArrayIdx = StringTable->EmptyString(); } void InspectorFieldUndoAction::initPersistFields() @@ -272,4 +272,4 @@ void InspectorFieldUndoAction::undo() // Now save the previous data in this UndoAction // since an undo action must become a redo action and vice-versa mData = data; -} \ No newline at end of file +} diff --git a/Engine/source/navigation/navMesh.cpp b/Engine/source/navigation/navMesh.cpp index 2d4b0ad7e..7dbb40d6d 100644 --- a/Engine/source/navigation/navMesh.cpp +++ b/Engine/source/navigation/navMesh.cpp @@ -181,7 +181,7 @@ DefineConsoleFunction(NavMeshUpdateOne, void, (S32 meshid, S32 objid, bool remov NavMesh::NavMesh() { mTypeMask |= StaticShapeObjectType | MarkerObjectType; - mFileName = StringTable->insert(""); + mFileName = StringTable->EmptyString(); mNetFlags.clear(Ghostable); mSaveIntermediates = false; @@ -211,7 +211,7 @@ NavMesh::NavMesh() mLargeCharacters = false; mVehicles = false; - mCoverSet = StringTable->insert(""); + mCoverSet = StringTable->EmptyString(); mInnerCover = false; mCoverDist = 1.0f; mPeekDist = 0.7f; diff --git a/Engine/source/navigation/navPath.cpp b/Engine/source/navigation/navPath.cpp index a945e7f8d..9409cc193 100644 --- a/Engine/source/navigation/navPath.cpp +++ b/Engine/source/navigation/navPath.cpp @@ -170,7 +170,7 @@ const char *NavPath::getProtectedFrom(void *obj, const char *data) if(object->mFromSet) return data; else - return StringTable->insert(""); + return StringTable->EmptyString(); } const char *NavPath::getProtectedTo(void *obj, const char *data) @@ -180,7 +180,7 @@ const char *NavPath::getProtectedTo(void *obj, const char *data) if(object->mToSet) return data; else - return StringTable->insert(""); + return StringTable->EmptyString(); } IRangeValidator ValidIterations(1, S32_MAX); diff --git a/Engine/source/platform/menus/popupMenu.cpp b/Engine/source/platform/menus/popupMenu.cpp index a7fc2e989..7e8aad7ba 100644 --- a/Engine/source/platform/menus/popupMenu.cpp +++ b/Engine/source/platform/menus/popupMenu.cpp @@ -51,7 +51,7 @@ PopupMenu::PopupMenu() : mCanvas(NULL) mSubmenus = new SimSet; mSubmenus->registerObject(); - mBarTitle = StringTable->insert(""); + mBarTitle = StringTable->EmptyString(); mIsPopup = false; mPopupGUID = sMaxPopupGUID++; diff --git a/Engine/source/platform/nativeDialogs/fileDialog.cpp b/Engine/source/platform/nativeDialogs/fileDialog.cpp index 08d689585..09ed1c63e 100644 --- a/Engine/source/platform/nativeDialogs/fileDialog.cpp +++ b/Engine/source/platform/nativeDialogs/fileDialog.cpp @@ -48,10 +48,10 @@ FileDialogData::FileDialogData() if (mDefaultPath == StringTable->lookup("") || !Platform::isDirectory(mDefaultPath)) mDefaultPath = Platform::getCurrentDirectory(); - mDefaultFile = StringTable->insert(""); - mFilters = StringTable->insert(""); - mFile = StringTable->insert(""); - mTitle = StringTable->insert(""); + mDefaultFile = StringTable->EmptyString(); + mFilters = StringTable->EmptyString(); + mFile = StringTable->EmptyString(); + mTitle = StringTable->EmptyString(); mStyle = 0;