From 595d4d3d0c928775472068ded165218388196d09 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Sun, 30 Nov 2025 19:24:19 +0100 Subject: [PATCH 1/4] refactor: Remove or replace some superfluous empty C strings --- .../Source/GameNetwork/GameSpy/PeerDefs.cpp | 4 ++-- .../Source/GameNetwork/GameSpy/Thread/PeerThread.cpp | 11 +++++++---- .../GameSpy/Thread/PersistentStorageThread.cpp | 2 +- Core/GameEngine/Source/GameNetwork/LANAPI.cpp | 2 +- .../GameEngine/Source/GameNetwork/LANAPICallbacks.cpp | 4 +--- Core/GameEngine/Source/GameNetwork/LANGameInfo.cpp | 1 - .../Source/StdDevice/Common/StdBIGFileSystem.cpp | 4 ++-- .../Source/Win32Device/Common/Win32BIGFileSystem.cpp | 4 ++-- Core/Tools/CRCDiff/KVPair.cpp | 4 ++-- Core/Tools/CRCDiff/expander.cpp | 4 ++-- Core/Tools/Compress/Compress.cpp | 4 ++-- Core/Tools/DebugWindow/DebugWindowDialog.cpp | 4 ++-- Core/Tools/PATCHGET/CHATAPI.cpp | 6 +++--- .../Include/GameLogic/Module/StructureToppleUpdate.h | 1 - .../Include/GameLogic/Module/UnitCrateCollide.h | 1 - .../GameEngine/Source/Common/INI/INIAnimation.cpp | 2 +- .../GameEngine/Source/GameClient/LanguageFilter.cpp | 4 ++-- .../Source/GameClient/System/ParticleSys.cpp | 2 +- .../GameLogic/Object/Behavior/SpawnBehavior.cpp | 2 +- .../GameLogic/Object/Create/GrantUpgradeCreate.cpp | 1 - .../Source/GameLogic/Object/Die/CreateCrateDie.cpp | 2 +- .../GameLogic/Object/Update/AutoDepositUpdate.cpp | 1 - .../Source/GameLogic/Object/Update/OCLUpdate.cpp | 5 ++--- .../Source/GameLogic/ScriptEngine/ScriptEngine.cpp | 2 +- .../Source/GameLogic/System/CrateSystem.cpp | 2 -- .../GameEngine/Source/GameLogic/System/GameLogic.cpp | 2 +- .../Source/W3DDevice/GameClient/W3DDisplay.cpp | 2 +- .../Libraries/Source/WWVegas/WW3D2/textureloader.cpp | 6 +++--- .../Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp | 2 +- .../Code/Tools/WorldBuilder/src/WorldBuilder.cpp | 2 +- .../Code/Tools/WorldBuilder/src/mapobjectprops.cpp | 2 +- 31 files changed, 44 insertions(+), 51 deletions(-) diff --git a/Core/GameEngine/Source/GameNetwork/GameSpy/PeerDefs.cpp b/Core/GameEngine/Source/GameNetwork/GameSpy/PeerDefs.cpp index 5c9e661b595..047ddd1bb17 100644 --- a/Core/GameEngine/Source/GameNetwork/GameSpy/PeerDefs.cpp +++ b/Core/GameEngine/Source/GameNetwork/GameSpy/PeerDefs.cpp @@ -85,7 +85,7 @@ void GameSpyInfo::reset( void ) m_localStagingRoomID = 0; m_localStagingRoom.reset(); m_gotGroupRoomList = false; - m_localName = ""; + m_localName.clear(); m_localProfileID = 0; m_maxMessagesPerUpdate = 100; m_disallowAsainText = FALSE; @@ -186,7 +186,7 @@ void GameSpyInfo::setGameOptions( void ) req.gameOptions.numPlayers = 0; req.gameOptions.numObservers = 0; Int numOpenSlots = 0; - AsciiString playerInfo = ""; + AsciiString playerInfo; for (i=0; istopHostingAlready(peer); #ifdef DEBUG_LOGGING - AsciiString val = ""; + AsciiString val; #define ADD(x) { qr2_buffer_add(buffer, x); val = x; } #define ADDINT(x) { qr2_buffer_add_int(buffer, x); val.format("%d",x); } #else @@ -852,7 +855,7 @@ static void QRPlayerKeyCallback #undef ADD #undef ADDINT #ifdef DEBUG_LOGGING - AsciiString val = ""; + AsciiString val; #define ADD(x) { qr2_buffer_add(buffer, x); val = x; } #define ADDINT(x) { qr2_buffer_add_int(buffer, x); val.format("%d",x); } #else @@ -1095,7 +1098,7 @@ static SerialAuthResult doCDKeyAuthentication( PEER peer ) if (!peer) return retval; - AsciiString s = ""; + AsciiString s; if (GetStringFromRegistry("\\ergc", "", s) && s.isNotEmpty()) { #ifdef SERVER_DEBUGGING diff --git a/Core/GameEngine/Source/GameNetwork/GameSpy/Thread/PersistentStorageThread.cpp b/Core/GameEngine/Source/GameNetwork/GameSpy/Thread/PersistentStorageThread.cpp index 1f2da6acf8d..d21dc205335 100644 --- a/Core/GameEngine/Source/GameNetwork/GameSpy/Thread/PersistentStorageThread.cpp +++ b/Core/GameEngine/Source/GameNetwork/GameSpy/Thread/PersistentStorageThread.cpp @@ -1315,7 +1315,7 @@ PSPlayerStats GameSpyPSMessageQueueInterface::parsePlayerKVPairs( std::string kv std::string GameSpyPSMessageQueueInterface::formatPlayerKVPairs( PSPlayerStats stats ) { char kvbuf[256]; - std::string s = ""; + std::string s; PerGeneralMap::iterator it; ITERATE_OVER(wins); diff --git a/Core/GameEngine/Source/GameNetwork/LANAPI.cpp b/Core/GameEngine/Source/GameNetwork/LANAPI.cpp index 9549e58c781..86db49cbc7d 100644 --- a/Core/GameEngine/Source/GameNetwork/LANAPI.cpp +++ b/Core/GameEngine/Source/GameNetwork/LANAPI.cpp @@ -638,7 +638,7 @@ void LANAPI::RequestGameJoin( LANGameInfo *game, UnsignedInt ip /* = 0 */ ) msg.GameToJoin.exeCRC = TheGlobalData->m_exeCRC; msg.GameToJoin.iniCRC = TheGlobalData->m_iniCRC; - AsciiString s = ""; + AsciiString s; GetStringFromRegistry("\\ergc", "", s); strlcpy(msg.GameToJoin.serial, s.str(), ARRAY_SIZE(msg.GameToJoin.serial)); diff --git a/Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp b/Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp index 9c9fd2a0a06..ee3c87e3bf6 100644 --- a/Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp +++ b/Core/GameEngine/Source/GameNetwork/LANAPICallbacks.cpp @@ -686,9 +686,7 @@ void LANAPI::OnChat( UnicodeString player, UnsignedInt ip, UnicodeString message switch (format) { case LANAPIInterface::LANCHAT_SYSTEM: - unicodeChat = L""; - unicodeChat.concat(message); - unicodeChat.concat(L""); + unicodeChat = message; index =GadgetListBoxAddEntryText(chatWindow, unicodeChat, chatSystemColor, -1, -1); break; case LANAPIInterface::LANCHAT_EMOTE: diff --git a/Core/GameEngine/Source/GameNetwork/LANGameInfo.cpp b/Core/GameEngine/Source/GameNetwork/LANGameInfo.cpp index 2c5a74ec792..c86a8d844a0 100644 --- a/Core/GameEngine/Source/GameNetwork/LANGameInfo.cpp +++ b/Core/GameEngine/Source/GameNetwork/LANGameInfo.cpp @@ -213,7 +213,6 @@ void LANDisplayGameList( GameWindow *gameListbox, LANGameInfo *gameList ) while (gameList) { UnicodeString txtGName; - txtGName = L""; if( gameList->isGameInProgress() ) { txtGName.concat(L"["); diff --git a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp index 079f00a307f..13f7045bb86 100644 --- a/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/StdDevice/Common/StdBIGFileSystem.cpp @@ -63,8 +63,8 @@ void StdBIGFileSystem::init() { AsciiString installPath; GetStringFromGeneralsRegistry("", "InstallPath", installPath ); //@todo this will need to be ramped up to a crash for release - DEBUG_ASSERTCRASH(installPath != "", ("Be 1337! Go install Generals!")); - if (installPath!="") + DEBUG_ASSERTCRASH(!installPath.isEmpty(), ("Be 1337! Go install Generals!")); + if (!installPath.isEmpty()) loadBigFilesFromDirectory(installPath, "*.big"); #endif } diff --git a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp index 8ced8a7b36a..5aaedc2f1b8 100644 --- a/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp +++ b/Core/GameEngineDevice/Source/Win32Device/Common/Win32BIGFileSystem.cpp @@ -64,8 +64,8 @@ void Win32BIGFileSystem::init() { AsciiString installPath; GetStringFromGeneralsRegistry("", "InstallPath", installPath ); //@todo this will need to be ramped up to a crash for release - DEBUG_ASSERTCRASH(installPath != "", ("Be 1337! Go install Generals!")); - if (installPath!="") + DEBUG_ASSERTCRASH(!installPath.isEmpty(), ("Be 1337! Go install Generals!")); + if (!installPath.isEmpty()) loadBigFilesFromDirectory(installPath, "*.big"); #endif } diff --git a/Core/Tools/CRCDiff/KVPair.cpp b/Core/Tools/CRCDiff/KVPair.cpp index 4aa7c4a968c..bd7b396195d 100644 --- a/Core/Tools/CRCDiff/KVPair.cpp +++ b/Core/Tools/CRCDiff/KVPair.cpp @@ -31,7 +31,7 @@ std::string intToString(int val) { - std::string s = ""; + std::string s; bool neg = (val < 0); if (val < 0) { @@ -134,7 +134,7 @@ void KVPairClass::readFromFile( const std::string& in, const std::string& delim FILE *fp = fopen(in.c_str(), "rb"); if (fp) { - std::string s = ""; + std::string s; fseek(fp, 0, SEEK_END); int len = ftell(fp); fseek(fp, 0, SEEK_SET); diff --git a/Core/Tools/CRCDiff/expander.cpp b/Core/Tools/CRCDiff/expander.cpp index 9e7961d5d08..37ce9e4d680 100644 --- a/Core/Tools/CRCDiff/expander.cpp +++ b/Core/Tools/CRCDiff/expander.cpp @@ -45,7 +45,7 @@ void Expander::expand( const std::string& input, std::string& output, bool stripUnknown ) { - output = ""; + output.clear(); unsigned int pos = input.find(m_left); unsigned int lastpos = input.npos; while (pos != input.npos) @@ -99,7 +99,7 @@ void Expander::expand( const std::string& input, else { std::string toExpand = it->second; - std::string expanded = ""; + std::string expanded; //DEBUG_LOG(("###### expanding '%s'", toExpand.c_str())); expand(toExpand, expanded, stripUnknown); //DEBUG_LOG(("###### expanded '%s'", expanded.c_str())); diff --git a/Core/Tools/Compress/Compress.cpp b/Core/Tools/Compress/Compress.cpp index a9119e7b255..323d557d427 100644 --- a/Core/Tools/Compress/Compress.cpp +++ b/Core/Tools/Compress/Compress.cpp @@ -52,8 +52,8 @@ void dumpHelp(const char *exe) int main(int argc, char **argv) { - std::string inFile = ""; - std::string outFile = ""; + std::string inFile; + std::string outFile; CompressionType compressType = CompressionManager::getPreferredCompression(); for (int i=1; iGetSel(cursorPosBeg, cursorPosEnd); - mVariablesString = ""; + mVariablesString.clear(); for (VecPairStringIt it = mVariables.begin(); it != mVariables.end(); it++) { mVariablesString += it->first; @@ -170,7 +170,7 @@ void DebugWindowDialog::_RebuildVarsString(void) void DebugWindowDialog::_RebuildMesgString(void) { - mMessagesString = ""; + mMessagesString.clear(); for (VecStringIt it = mMessages.begin(); it != mMessages.end(); it++) { mMessagesString += (*it); diff --git a/Core/Tools/PATCHGET/CHATAPI.cpp b/Core/Tools/PATCHGET/CHATAPI.cpp index 7e475e6ffcf..bba0c3902d3 100644 --- a/Core/Tools/PATCHGET/CHATAPI.cpp +++ b/Core/Tools/PATCHGET/CHATAPI.cpp @@ -359,7 +359,7 @@ static void queuePatch(bool mandatory, std::string downloadURL) std::string fileStr = filePath; unsigned int slashPos = filePath.find_last_of('/'); std::string fileDir = "patches\\"; - std::string fileName = ""; + std::string fileName; if (slashPos == filePath.npos) { fileName = filePath; @@ -816,7 +816,7 @@ char const * Fetch_String(int id) /* ** Determine if the string ID requested is valid. If not then return an empty string pointer. */ - if (id == -1 || id == TXT_NONE) return(""); + if (id == -1 || id == TXT_NONE) return ""; /* ** Adjust the 'time stamp' tracking value. This is an artificial value used merely to track @@ -859,7 +859,7 @@ char const * Fetch_String(int id) if (LoadString(Global_instance, id, stringptr, sizeof(_buffers[oldest].String)) == 0) { - return(""); + return ""; } /****** diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h index 916b28ac4ea..9e8931794df 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h @@ -119,7 +119,6 @@ class StructureToppleUpdateModuleData : public UpdateModuleData m_toppleDoneFXList = NULL; m_toppleFXList = NULL; m_crushingFXList = NULL; - m_crushingWeaponName.set(""); for (int i = 0; i < ST_PHASE_COUNT; ++i) { diff --git a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/UnitCrateCollide.h b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/UnitCrateCollide.h index e4595a174a0..d0f90a70514 100644 --- a/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/UnitCrateCollide.h +++ b/GeneralsMD/Code/GameEngine/Include/GameLogic/Module/UnitCrateCollide.h @@ -46,7 +46,6 @@ class UnitCrateCollideModuleData : public CrateCollideModuleData UnitCrateCollideModuleData() { m_unitCount = 0; - m_unitType = ""; } static void buildFieldParse(MultiIniFieldParse& p) diff --git a/GeneralsMD/Code/GameEngine/Source/Common/INI/INIAnimation.cpp b/GeneralsMD/Code/GameEngine/Source/Common/INI/INIAnimation.cpp index 78bc98c20d6..7300b1ebc74 100644 --- a/GeneralsMD/Code/GameEngine/Source/Common/INI/INIAnimation.cpp +++ b/GeneralsMD/Code/GameEngine/Source/Common/INI/INIAnimation.cpp @@ -65,7 +65,7 @@ void INI::parseAnim2DDefinition( INI* ini ) // item not found, create a new one animTemplate = TheAnim2DCollection->newTemplate( name ); - DEBUG_ASSERTCRASH( animTemplate, ("INI""parseAnim2DDefinition - unable to allocate animation template for '%s'", + DEBUG_ASSERTCRASH( animTemplate, ("INI::parseAnim2DDefinition - unable to allocate animation template for '%s'", name.str()) ); } diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/LanguageFilter.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/LanguageFilter.cpp index 46b2f116c94..6185748421c 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/LanguageFilter.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/LanguageFilter.cpp @@ -84,7 +84,7 @@ void LanguageFilter::filterLine(UnicodeString &line) wcscpy(buf, line.str()); UnicodeString newLine(line); - UnicodeString token(L""); + UnicodeString token; while (newLine.nextToken(&token, L" ;,.!?:=\\/><`~()&^%#\n\t")) { wchar_t *pos = wcsstr(buf, token.str()); @@ -112,7 +112,7 @@ void LanguageFilter::filterLine(UnicodeString &line) void LanguageFilter::unHaxor(UnicodeString &word) { Int len = word.getLength(); - UnicodeString newWord(L""); + UnicodeString newWord; for (Int i = 0; i < len; ++i) { wchar_t c = word.getCharAt(i); if ((c == L'p') || (c == L'P')) { diff --git a/GeneralsMD/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp b/GeneralsMD/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp index 03d7c5448a1..d847d9df59e 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp @@ -3256,7 +3256,7 @@ void ParticleSystemManager::xfer( Xfer *xfer ) // ignore destroyed systems and non-saveable systems if( system->isDestroyed() == TRUE || system->isSaveable() == FALSE ) { - AsciiString mtString = ""; + AsciiString mtString; xfer->xferAsciiString(&mtString); // write null string as key for destroyed system. continue; } diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp index b645f454b1f..81ca57e86ee 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp @@ -574,7 +574,7 @@ Object *SpawnBehavior::reclaimOrphanSpawn( void ) // OrphanData orphanData; - AsciiString prevName = ""; + AsciiString prevName; for (std::vector::const_iterator tempName = md->m_spawnTemplateNameData.begin(); tempName != md->m_spawnTemplateNameData.end(); ++tempName) diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Create/GrantUpgradeCreate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Create/GrantUpgradeCreate.cpp index b8ab4c3dfff..2c4e347f274 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Create/GrantUpgradeCreate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Create/GrantUpgradeCreate.cpp @@ -41,7 +41,6 @@ // ------------------------------------------------------------------------------------------------ GrantUpgradeCreateModuleData::GrantUpgradeCreateModuleData() { - m_upgradeName = ""; } // ------------------------------------------------------------------------------------------------ diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp index 7fead542b6f..de3a54c8c2d 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp @@ -179,7 +179,7 @@ Object *CreateCrateDie::createCrate( CrateTemplate const *currentCrateData ) // CreationChance is used for the success of this block, but this block can have any number of potential actual crates Real multipleCratePick = GameLogicRandomValueReal( 0, 1 ); Real multipleCrateRunningTotal = 0; - AsciiString crateName = ""; + AsciiString crateName; for( crateCreationEntryConstIterator iter = currentCrateData->m_possibleCrates.begin(); iter != currentCrateData->m_possibleCrates.end(); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AutoDepositUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AutoDepositUpdate.cpp index dbda4390ce1..6c12c9a5536 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AutoDepositUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/AutoDepositUpdate.cpp @@ -72,7 +72,6 @@ void parseUpgradePair( INI *ini, void *instance, void *store, const void *userData ) { upgradePair info; - info.type = ""; info.amount = 0; const char *token = ini->getNextToken( ini->getSepsColon() ); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/OCLUpdate.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/OCLUpdate.cpp index e8e5d1346f1..a05d9ff2b3c 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/OCLUpdate.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/Object/Update/OCLUpdate.cpp @@ -46,8 +46,7 @@ void parseFactionObjectCreationList( INI *ini, void *instance, void *store, const void *userData ) { OCLUpdateModuleData::FactionOCLInfo info; - info.m_factionName = ""; - info.m_ocl = 0; + info.m_ocl = NULL; const char *token = ini->getNextToken( ini->getSepsColon() ); @@ -199,7 +198,7 @@ UpdateSleepTime OCLUpdate::update( void ) // If this is faction triggered, search through the faction specific OCLs to find the match if (data->m_isFactionTriggered) { - std::string playerFactionName(""); + std::string playerFactionName; Player *player = getObject()->getControllingPlayer(); if (!player) return UPDATE_SLEEP_NONE; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp index 41b35abe0b0..ee2d05bf229 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp @@ -9803,7 +9803,7 @@ void _writeSingleParticleSystem( File *out, ParticleSystemTemplate *templ ) // these were all originally << (feed-operator for streams) // I might come back and re-write this later, if there are enough complaints. ;-) jkmcd // in the meantime, move along... - std::string thisEntry = ""; + std::string thisEntry; thisEntry.append(HEADER).append(SEP_SPACE).append(templ->getName().str()).append(SEP_EOL); thisEntry.append(SEP_HEAD).append(F_PRIORITY).append(EQ_WITH_SPACES).append(ParticlePriorityNames[templ->m_priority]).append(SEP_EOL); thisEntry.append(SEP_HEAD).append(F_ISONESHOT).append(EQ_WITH_SPACES).append((templ->m_isOneShot ? STR_TRUE : STR_FALSE)).append(SEP_EOL); diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/CrateSystem.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/CrateSystem.cpp index baf563ea463..33eb9cef8e6 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/CrateSystem.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/CrateSystem.cpp @@ -190,8 +190,6 @@ const FieldParse CrateTemplate::TheCrateTemplateFieldParseTable[] = CrateTemplate::CrateTemplate() { - m_name = ""; - m_creationChance = 0; CLEAR_KINDOFMASK(m_killedByTypeKindof); m_veterancyLevel = LEVEL_INVALID; diff --git a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp index df8b1226634..a6001e2206b 100644 --- a/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp +++ b/GeneralsMD/Code/GameEngine/Source/GameLogic/System/GameLogic.cpp @@ -3449,7 +3449,7 @@ static void unitTimings(void) { if (sides[side] == "*") { - if ( btt->getDefaultOwningSide() == ("") )// wildcard for unspecified side + if ( btt->getDefaultOwningSide().isEmpty() )// wildcard for unspecified side unspecified = TRUE; else continue; diff --git a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp index bcf853c1ad5..6f3c9ba6eb3 100644 --- a/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp +++ b/GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp @@ -1378,7 +1378,7 @@ void W3DDisplay::gatherDebugStats( void ) // Network outgoing bandwidth stats // unibuffer.format(L"OUT: 0.0 bytes/sec, 0.0 packets/sec"); // m_displayStrings[NetOutgoing]->setText( unibuffer ); - unibuffer.format(L""); + unibuffer.clear(); // unibuffer.format(L"Network not present"); m_displayStrings[NetOutgoing]->setText(unibuffer); m_displayStrings[NetIncoming]->setText(unibuffer); diff --git a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp index 12326a1f25a..3b1fcfa61df 100644 --- a/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp +++ b/GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp @@ -1095,7 +1095,7 @@ void TextureLoadTaskClass::Init(TextureBaseClass* tc, TaskType type, PriorityTyp REF_PTR_SET(Texture, tc); // Make sure texture has a filename. - WWASSERT(Texture->Get_Full_Path() != ""); + WWASSERT(!Texture->Get_Full_Path().Is_Empty()); Type = type; Priority = priority; @@ -2065,7 +2065,7 @@ void CubeTextureLoadTaskClass::Init(TextureBaseClass* tc, TaskType type, Priorit REF_PTR_SET(Texture, tc); // Make sure texture has a filename. - WWASSERT(Texture->Get_Full_Path() != ""); + WWASSERT(!Texture->Get_Full_Path().Is_Empty()); Type = type; Priority = priority; @@ -2476,7 +2476,7 @@ void VolumeTextureLoadTaskClass::Init(TextureBaseClass* tc, TaskType type, Prior REF_PTR_SET(Texture, tc); // Make sure texture has a filename. - WWASSERT(Texture->Get_Full_Path() != ""); + WWASSERT(!Texture->Get_Full_Path().Is_Empty()); Type = type; Priority = priority; diff --git a/GeneralsMD/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp b/GeneralsMD/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp index c1b902172c6..42564af5e68 100644 --- a/GeneralsMD/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp +++ b/GeneralsMD/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp @@ -2155,7 +2155,7 @@ Bool WorldHeightMapEdit::selectInvalidTeam(void) } } - AsciiString report = ""; + AsciiString report; AsciiString line; #if 0 diff --git a/GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilder.cpp b/GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilder.cpp index 8b01c80c837..ba2930f30a0 100644 --- a/GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilder.cpp +++ b/GeneralsMD/Code/Tools/WorldBuilder/src/WorldBuilder.cpp @@ -703,7 +703,7 @@ void CWorldBuilderApp::OnFileOpen() #endif CFileStatus status; - if (m_currentDirectory != "") try { + if (!m_currentDirectory.isEmpty()) try { if (CFile::GetStatus(m_currentDirectory.str(), status)) { if (status.m_attribute & CFile::directory) { ::SetCurrentDirectory(m_currentDirectory.str()); diff --git a/GeneralsMD/Code/Tools/WorldBuilder/src/mapobjectprops.cpp b/GeneralsMD/Code/Tools/WorldBuilder/src/mapobjectprops.cpp index a0d7487fbef..9917fa1ec4d 100644 --- a/GeneralsMD/Code/Tools/WorldBuilder/src/mapobjectprops.cpp +++ b/GeneralsMD/Code/Tools/WorldBuilder/src/mapobjectprops.cpp @@ -221,7 +221,7 @@ void MapObjectProps::_DictToTeam(void) /// Move data from object to dialog controls void MapObjectProps::_DictToName(void) { - AsciiString name = ""; + AsciiString name; Bool exists; if (m_dictToEdit) { From 2095d401d3740475a4dfb63f0679307db2114c94 Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Sun, 30 Nov 2025 19:36:35 +0100 Subject: [PATCH 2/4] Revert calling clear on std::string because it does not work in VC6 --- Core/Tools/CRCDiff/expander.cpp | 2 +- Core/Tools/DebugWindow/DebugWindowDialog.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/Tools/CRCDiff/expander.cpp b/Core/Tools/CRCDiff/expander.cpp index 37ce9e4d680..f1d4d07c789 100644 --- a/Core/Tools/CRCDiff/expander.cpp +++ b/Core/Tools/CRCDiff/expander.cpp @@ -45,7 +45,7 @@ void Expander::expand( const std::string& input, std::string& output, bool stripUnknown ) { - output.clear(); + output = ""; unsigned int pos = input.find(m_left); unsigned int lastpos = input.npos; while (pos != input.npos) diff --git a/Core/Tools/DebugWindow/DebugWindowDialog.cpp b/Core/Tools/DebugWindow/DebugWindowDialog.cpp index 34dfea1f316..202f6e87584 100644 --- a/Core/Tools/DebugWindow/DebugWindowDialog.cpp +++ b/Core/Tools/DebugWindow/DebugWindowDialog.cpp @@ -151,7 +151,7 @@ void DebugWindowDialog::_RebuildVarsString(void) { int cursorPosBeg, cursorPosEnd; ((CEdit*)GetDlgItem(IDC_Variables))->GetSel(cursorPosBeg, cursorPosEnd); - mVariablesString.clear(); + mVariablesString = ""; for (VecPairStringIt it = mVariables.begin(); it != mVariables.end(); it++) { mVariablesString += it->first; @@ -170,7 +170,7 @@ void DebugWindowDialog::_RebuildVarsString(void) void DebugWindowDialog::_RebuildMesgString(void) { - mMessagesString.clear(); + mMessagesString = ""; for (VecStringIt it = mMessages.begin(); it != mMessages.end(); it++) { mMessagesString += (*it); From 6bf0765b478573f2a2beaa3facb42a29bc1907cc Mon Sep 17 00:00:00 2001 From: xezon <4720891+xezon@users.noreply.github.com> Date: Mon, 1 Dec 2025 20:03:44 +0100 Subject: [PATCH 3/4] Remove more empty string inits in PeerThread --- .../Source/GameNetwork/GameSpy/Thread/PeerThread.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/Core/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp b/Core/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp index 9814892e119..05f7bbb75f4 100644 --- a/Core/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp +++ b/Core/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp @@ -193,14 +193,11 @@ class PeerThreadClass : public ThreadClass m_sawCompleteGameList = FALSE; m_isConnecting = m_isConnected = false; m_groupRoomID = m_profileID = 0; - m_nextStagingServer = 1; m_stagingServers.clear(); - m_pingStr = ""; - m_mapName = ""; - m_ladderIP = ""; + m_nextStagingServer = 1; + m_stagingServers.clear(); m_isHosting = false; for (Int i=0; i Date: Mon, 1 Dec 2025 21:08:34 +0100 Subject: [PATCH 4/4] Replicate in Generals --- .../Include/GameLogic/Module/StructureToppleUpdate.h | 1 - .../GameEngine/Include/GameLogic/Module/UnitCrateCollide.h | 1 - Generals/Code/GameEngine/Source/Common/INI/INIAnimation.cpp | 2 +- Generals/Code/GameEngine/Source/GameClient/LanguageFilter.cpp | 4 ++-- .../Code/GameEngine/Source/GameClient/System/ParticleSys.cpp | 2 +- .../Source/GameLogic/Object/Behavior/SpawnBehavior.cpp | 2 +- .../Source/GameLogic/Object/Create/GrantUpgradeCreate.cpp | 1 - .../GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp | 2 +- .../Source/GameLogic/Object/Update/AutoDepositUpdate.cpp | 1 - .../GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp | 2 +- .../Code/GameEngine/Source/GameLogic/System/CrateSystem.cpp | 2 -- .../Source/W3DDevice/GameClient/W3DDisplay.cpp | 2 +- .../Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp | 2 +- Generals/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp | 2 +- Generals/Code/Tools/WorldBuilder/src/WorldBuilder.cpp | 2 +- Generals/Code/Tools/WorldBuilder/src/mapobjectprops.cpp | 2 +- 16 files changed, 12 insertions(+), 18 deletions(-) diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h b/Generals/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h index f4e6379dc1f..eeb21ea77a7 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/StructureToppleUpdate.h @@ -118,7 +118,6 @@ class StructureToppleUpdateModuleData : public UpdateModuleData m_toppleDoneFXList = NULL; m_toppleFXList = NULL; m_crushingFXList = NULL; - m_crushingWeaponName.set(""); for (int i = 0; i < ST_PHASE_COUNT; ++i) { diff --git a/Generals/Code/GameEngine/Include/GameLogic/Module/UnitCrateCollide.h b/Generals/Code/GameEngine/Include/GameLogic/Module/UnitCrateCollide.h index b1ad7f58950..905ae7d740e 100644 --- a/Generals/Code/GameEngine/Include/GameLogic/Module/UnitCrateCollide.h +++ b/Generals/Code/GameEngine/Include/GameLogic/Module/UnitCrateCollide.h @@ -46,7 +46,6 @@ class UnitCrateCollideModuleData : public CrateCollideModuleData UnitCrateCollideModuleData() { m_unitCount = 0; - m_unitType = ""; } static void buildFieldParse(MultiIniFieldParse& p) diff --git a/Generals/Code/GameEngine/Source/Common/INI/INIAnimation.cpp b/Generals/Code/GameEngine/Source/Common/INI/INIAnimation.cpp index 312a11bddf3..0fd66a40454 100644 --- a/Generals/Code/GameEngine/Source/Common/INI/INIAnimation.cpp +++ b/Generals/Code/GameEngine/Source/Common/INI/INIAnimation.cpp @@ -65,7 +65,7 @@ void INI::parseAnim2DDefinition( INI* ini ) // item not found, create a new one animTemplate = TheAnim2DCollection->newTemplate( name ); - DEBUG_ASSERTCRASH( animTemplate, ("INI""parseAnim2DDefinition - unable to allocate animation template for '%s'", + DEBUG_ASSERTCRASH( animTemplate, ("INI::parseAnim2DDefinition - unable to allocate animation template for '%s'", name.str()) ); } diff --git a/Generals/Code/GameEngine/Source/GameClient/LanguageFilter.cpp b/Generals/Code/GameEngine/Source/GameClient/LanguageFilter.cpp index 15ef18db3b3..9a1a4e66052 100644 --- a/Generals/Code/GameEngine/Source/GameClient/LanguageFilter.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/LanguageFilter.cpp @@ -84,7 +84,7 @@ void LanguageFilter::filterLine(UnicodeString &line) wcscpy(buf, line.str()); UnicodeString newLine(line); - UnicodeString token(L""); + UnicodeString token; while (newLine.nextToken(&token, L" ;,.!?:=\\/><`~()&^%#\n\t")) { wchar_t *pos = wcsstr(buf, token.str()); @@ -112,7 +112,7 @@ void LanguageFilter::filterLine(UnicodeString &line) void LanguageFilter::unHaxor(UnicodeString &word) { Int len = word.getLength(); - UnicodeString newWord(L""); + UnicodeString newWord; for (Int i = 0; i < len; ++i) { wchar_t c = word.getCharAt(i); if ((c == L'p') || (c == L'P')) { diff --git a/Generals/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp b/Generals/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp index 12104ec64b3..5e4c0e8b4de 100644 --- a/Generals/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp +++ b/Generals/Code/GameEngine/Source/GameClient/System/ParticleSys.cpp @@ -3354,7 +3354,7 @@ void ParticleSystemManager::xfer( Xfer *xfer ) // ignore destroyed systems and non-saveable systems if( system->isDestroyed() == TRUE || system->isSaveable() == FALSE ) { - AsciiString mtString = ""; + AsciiString mtString; xfer->xferAsciiString(&mtString); // write null string as key for destroyed system. continue; } diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp index 350e7f78666..294fad763d5 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Behavior/SpawnBehavior.cpp @@ -530,7 +530,7 @@ Object *SpawnBehavior::reclaimOrphanSpawn( void ) // OrphanData orphanData; - AsciiString prevName = ""; + AsciiString prevName; for (std::vector::const_iterator tempName = md->m_spawnTemplateNameData.begin(); tempName != md->m_spawnTemplateNameData.end(); ++tempName) diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Create/GrantUpgradeCreate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Create/GrantUpgradeCreate.cpp index fc806b6058b..c8bcb5ded2e 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Create/GrantUpgradeCreate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Create/GrantUpgradeCreate.cpp @@ -41,7 +41,6 @@ // ------------------------------------------------------------------------------------------------ GrantUpgradeCreateModuleData::GrantUpgradeCreateModuleData() { - m_upgradeName = ""; } // ------------------------------------------------------------------------------------------------ diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp index 6f4c88aab94..ee05f5bd9f1 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Die/CreateCrateDie.cpp @@ -179,7 +179,7 @@ Object *CreateCrateDie::createCrate( CrateTemplate const *currentCrateData ) // CreationChance is used for the success of this block, but this block can have any number of potential actual crates Real multipleCratePick = GameLogicRandomValueReal( 0, 1 ); Real multipleCrateRunningTotal = 0; - AsciiString crateName = ""; + AsciiString crateName; for( crateCreationEntryConstIterator iter = currentCrateData->m_possibleCrates.begin(); iter != currentCrateData->m_possibleCrates.end(); diff --git a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AutoDepositUpdate.cpp b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AutoDepositUpdate.cpp index 02e50f9d792..3daca28f94f 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AutoDepositUpdate.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/Object/Update/AutoDepositUpdate.cpp @@ -71,7 +71,6 @@ void parseUpgradePair( INI *ini, void *instance, void *store, const void *userData ) { upgradePair info; - info.type = ""; info.amount = 0; const char *token = ini->getNextToken( ini->getSepsColon() ); diff --git a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp index 95b6957d5bf..6ff9d7e76ef 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp @@ -9080,7 +9080,7 @@ void _writeSingleParticleSystem( File *out, ParticleSystemTemplate *templ ) // these were all originally << (feed-operator for streams) // I might come back and re-write this later, if there are enough complaints. ;-) jkmcd // in the meantime, move along... - std::string thisEntry = ""; + std::string thisEntry; thisEntry.append(HEADER).append(SEP_SPACE).append(templ->getName().str()).append(SEP_EOL); thisEntry.append(SEP_HEAD).append(F_PRIORITY).append(EQ_WITH_SPACES).append(ParticlePriorityNames[templ->m_priority]).append(SEP_EOL); thisEntry.append(SEP_HEAD).append(F_ISONESHOT).append(EQ_WITH_SPACES).append((templ->m_isOneShot ? STR_TRUE : STR_FALSE)).append(SEP_EOL); diff --git a/Generals/Code/GameEngine/Source/GameLogic/System/CrateSystem.cpp b/Generals/Code/GameEngine/Source/GameLogic/System/CrateSystem.cpp index 8865ffbf9e0..810e5d07b46 100644 --- a/Generals/Code/GameEngine/Source/GameLogic/System/CrateSystem.cpp +++ b/Generals/Code/GameEngine/Source/GameLogic/System/CrateSystem.cpp @@ -190,8 +190,6 @@ const FieldParse CrateTemplate::TheCrateTemplateFieldParseTable[] = CrateTemplate::CrateTemplate() { - m_name = ""; - m_creationChance = 0; CLEAR_KINDOFMASK(m_killedByTypeKindof); m_veterancyLevel = LEVEL_INVALID; diff --git a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp index 42dcd033dbb..b8ce435c769 100644 --- a/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp +++ b/Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cpp @@ -1326,7 +1326,7 @@ void W3DDisplay::gatherDebugStats( void ) // Network outgoing bandwidth stats // unibuffer.format(L"OUT: 0.0 bytes/sec, 0.0 packets/sec"); // m_displayStrings[NetOutgoing]->setText( unibuffer ); - unibuffer.format(L""); + unibuffer.clear(); // unibuffer.format(L"Network not present"); m_displayStrings[NetOutgoing]->setText(unibuffer); m_displayStrings[NetIncoming]->setText(unibuffer); diff --git a/Generals/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp b/Generals/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp index 0a8101085d7..ced18c40aa5 100644 --- a/Generals/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp +++ b/Generals/Code/Libraries/Source/WWVegas/WW3D2/textureloader.cpp @@ -992,7 +992,7 @@ void TextureLoadTaskClass::Init(TextureBaseClass* tc,bool high_priority) { // Make sure texture has a filename. REF_PTR_SET(Texture,tc); - //WWASSERT(Texture->Get_Full_Path() != NULL); + //WWASSERT(!Texture->Get_Full_Path().Is_Empty()); Reduction=Texture->Get_Reduction(); HighPriorityRequested=high_priority; diff --git a/Generals/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp b/Generals/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp index 78fd55aeec2..9a8ed551168 100644 --- a/Generals/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp +++ b/Generals/Code/Tools/WorldBuilder/src/WHeightMapEdit.cpp @@ -2183,7 +2183,7 @@ Bool WorldHeightMapEdit::selectInvalidTeam(void) } } - AsciiString report = ""; + AsciiString report; AsciiString line; #if 0 diff --git a/Generals/Code/Tools/WorldBuilder/src/WorldBuilder.cpp b/Generals/Code/Tools/WorldBuilder/src/WorldBuilder.cpp index 577eedc7d4c..07591396655 100644 --- a/Generals/Code/Tools/WorldBuilder/src/WorldBuilder.cpp +++ b/Generals/Code/Tools/WorldBuilder/src/WorldBuilder.cpp @@ -681,7 +681,7 @@ void CWorldBuilderApp::OnFileOpen() #endif CFileStatus status; - if (m_currentDirectory != "") try { + if (!m_currentDirectory.isEmpty()) try { if (CFile::GetStatus(m_currentDirectory.str(), status)) { if (status.m_attribute & CFile::directory) { ::SetCurrentDirectory(m_currentDirectory.str()); diff --git a/Generals/Code/Tools/WorldBuilder/src/mapobjectprops.cpp b/Generals/Code/Tools/WorldBuilder/src/mapobjectprops.cpp index cad7018834a..fe8c46bd545 100644 --- a/Generals/Code/Tools/WorldBuilder/src/mapobjectprops.cpp +++ b/Generals/Code/Tools/WorldBuilder/src/mapobjectprops.cpp @@ -376,7 +376,7 @@ void MapObjectProps::_DictToTeam(void) void MapObjectProps::_DictToName(void) { - AsciiString name = ""; + AsciiString name; Bool exists; if (m_dictToEdit) { name = m_dictToEdit->getAsciiString(TheKey_objectName, &exists);