diff --git a/code/nel/include/nel/misc/sha1.h b/code/nel/include/nel/misc/sha1.h index d4c630c22..ae42c3c1e 100644 --- a/code/nel/include/nel/misc/sha1.h +++ b/code/nel/include/nel/misc/sha1.h @@ -29,7 +29,7 @@ struct CHashKey CHashKey (const unsigned char Message_Digest[20]) { - HashKeyString = ""; + HashKeyString.clear(); for(sint i = 0; i < 20 ; ++i) { HashKeyString += Message_Digest[i]; @@ -45,7 +45,7 @@ struct CHashKey } else if (str.size() == 40) { - HashKeyString = ""; + HashKeyString.clear(); for(uint i = 0; i < str.size(); i+=2) { uint8 val; diff --git a/code/nel/src/3d/cluster.cpp b/code/nel/src/3d/cluster.cpp index 76ed153e1..d78468e61 100644 --- a/code/nel/src/3d/cluster.cpp +++ b/code/nel/src/3d/cluster.cpp @@ -319,7 +319,7 @@ void CCluster::serial (NLMISC::IStream&f) // write the env fx name std::string envFxName = CStringMapper::unmap(_EnvironmentFxId); if (envFxName == "no fx") - envFxName = ""; + envFxName.clear(); f.serial(envFxName); } diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp index 887034a9d..5bd0e2cbf 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d.cpp @@ -1265,7 +1265,7 @@ bool CDriverD3D::init (uintptr_t windowIcon, emptyProc exitFunc) if (error != ERROR_CLASS_ALREADY_EXISTS) { nlwarning("CDriverD3D::init: Can't register window class %s (error code %i)", _WindowClass.c_str(), (sint)error); - _WindowClass = ""; + _WindowClass.clear(); return false; } } diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_shader.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_shader.cpp index 5cc6c283c..6f48cc2a4 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_shader.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_shader.cpp @@ -62,7 +62,7 @@ void CD3DShaderFX::setName (const char *name) bool CD3DShaderFX::loadShaderFile (const char *filename) { - _Text = ""; + _Text.clear(); // Lookup string _filename = NLMISC::CPath::lookup(filename, false, true, true); if (!_filename.empty()) diff --git a/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp index d4af02592..69ae49c4f 100644 --- a/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp +++ b/code/nel/src/3d/driver/direct3d/driver_direct3d_vertex_program.cpp @@ -109,7 +109,7 @@ void dumpWriteMask(uint mask, std::string &out) H_AUTO_D3D(dumpWriteMask) if (mask == 0xf) { - out = ""; + out.clear(); return; } out = "."; @@ -126,7 +126,7 @@ void dumpSwizzle(const CVPSwizzle &swz, std::string &out) H_AUTO_D3D(dumpSwizzle) if (swz.isIdentity()) { - out = ""; + out.clear(); return; } out = "."; diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp index cbd1bcd9a..46804cce1 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_inputs.cpp @@ -491,7 +491,7 @@ void CDriverGL::showCursor(bool b) } else { - _CurrName = ""; + _CurrName.clear(); } // update current hardware icon to avoid to have the plain arrow diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp index 93d281fec..c2e37ac89 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_vertex_program.cpp @@ -1270,7 +1270,7 @@ static void ARBVertexProgramDumpWriteMask(uint mask, std::string &out) H_AUTO_OGL(ARBVertexProgramDumpWriteMask) if (mask == 0xf) { - out = ""; + out.clear(); return; } out = "."; @@ -1286,7 +1286,7 @@ static void ARBVertexProgramDumpSwizzle(const CVPSwizzle &swz, std::string &out) H_AUTO_OGL(ARBVertexProgramDumpSwizzle) if (swz.isIdentity()) { - out = ""; + out.clear(); return; } out = "."; diff --git a/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp b/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp index 4da55a009..b55ad5865 100644 --- a/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp +++ b/code/nel/src/3d/driver/opengl/unix_event_emitter.cpp @@ -626,7 +626,7 @@ bool CUnixEventEmitter::processMessage (XEvent &event, CEventServer *server) } case SelectionClear: _SelectionOwned = false; - _CopiedString = ""; + _CopiedString.clear(); break; case SelectionNotify: { diff --git a/code/nel/src/3d/landscape_user.cpp b/code/nel/src/3d/landscape_user.cpp index c2c3a4b27..fd1bc3747 100644 --- a/code/nel/src/3d/landscape_user.cpp +++ b/code/nel/src/3d/landscape_user.cpp @@ -262,8 +262,8 @@ void CLandscapeUser::refreshZonesAround(const CVector &pos, float radius, std::s { NL3D_HAUTO_LOAD_LANDSCAPE; - zoneRemoved= ""; - zoneAdded= ""; + zoneRemoved.clear(); + zoneAdded.clear(); CZoneManager::SZoneManagerWork Work; // Check if new zone must be added to landscape if (_ZoneManager.isWorkComplete(Work)) diff --git a/code/nel/src/3d/portal.cpp b/code/nel/src/3d/portal.cpp index deb80c5c5..62df832db 100644 --- a/code/nel/src/3d/portal.cpp +++ b/code/nel/src/3d/portal.cpp @@ -242,11 +242,11 @@ void CPortal::serial (NLMISC::IStream& f) { std::string occName = CStringMapper::unmap(_OcclusionModelId); if (occName == "no occlusion") - occName = ""; + occName.clear(); f.serial(occName); occName = CStringMapper::unmap(_OpenOcclusionModelId); if (occName == "no occlusion") - occName = ""; + occName.clear(); f.serial(occName); } } diff --git a/code/nel/src/3d/tile_bank.cpp b/code/nel/src/3d/tile_bank.cpp index 0f05b3df6..5cacae18e 100644 --- a/code/nel/src/3d/tile_bank.cpp +++ b/code/nel/src/3d/tile_bank.cpp @@ -134,7 +134,7 @@ void CTileBank::serial(NLMISC::IStream &f) throw(NLMISC::EStream) nlassert (f.isReading()); // Reset _AbsPath - _AbsPath=""; + _AbsPath.clear(); // Remove diffuse and additive in transition uint tileCount=(uint)getTileCount (); @@ -782,7 +782,7 @@ void CTile::serial(NLMISC::IStream &f) throw(NLMISC::EStream) _Flags=0; // Initialize alpha name - _BitmapName[alpha]=""; + _BitmapName[alpha].clear(); // Read free flag f.serial (tmp); @@ -804,7 +804,7 @@ void CTile::serial(NLMISC::IStream &f) throw(NLMISC::EStream) // *************************************************************************** void CTile::clearTile (CTile::TBitmap type) { - _BitmapName[type]=""; + _BitmapName[type].clear(); } @@ -1521,7 +1521,7 @@ void CTileSet::setDisplacement (TDisplacement displacement, const std::string& f // *************************************************************************** void CTileSet::cleanUnusedData () { - _Name=""; + _Name.clear(); _ChildName.clear(); _Border128[0].reset (); _Border128[1].reset (); @@ -1853,14 +1853,12 @@ CTileNoise::CTileNoise () { // Not loaded _TileNoiseMap=NULL; - _FileName=""; } // *************************************************************************** CTileNoise::CTileNoise (const CTileNoise &src) { // Default ctor _TileNoiseMap=NULL; - _FileName=""; // Copy *this=src; @@ -1932,7 +1930,7 @@ void CTileNoise::reset() } // Erase filename - _FileName=""; + _FileName.clear(); } // *************************************************************************** diff --git a/code/nel/src/3d/vertex_buffer.cpp b/code/nel/src/3d/vertex_buffer.cpp index fc09dc956..8315b46da 100644 --- a/code/nel/src/3d/vertex_buffer.cpp +++ b/code/nel/src/3d/vertex_buffer.cpp @@ -885,7 +885,7 @@ void CVertexBuffer::serialHeader(NLMISC::IStream &f) if(f.isReading()) { _PreferredMemory = RAMPreferred; - _Name = ""; + _Name.clear(); } } } diff --git a/code/nel/src/3d/vertex_program_parse.cpp b/code/nel/src/3d/vertex_program_parse.cpp index 0e144d54f..259e72b41 100644 --- a/code/nel/src/3d/vertex_program_parse.cpp +++ b/code/nel/src/3d/vertex_program_parse.cpp @@ -1110,7 +1110,7 @@ static void dumpWriteMask(uint mask, std::string &out) { if (mask == 0xf) { - out = ""; + out.clear(); return; } out = "."; @@ -1125,7 +1125,7 @@ static void dumpSwizzle(const CVPSwizzle &swz, std::string &out) { if (swz.isIdentity()) { - out = ""; + out.clear(); return; } out = "."; diff --git a/code/nel/src/3d/zone_manager.cpp b/code/nel/src/3d/zone_manager.cpp index efa36fa66..34a670b5e 100644 --- a/code/nel/src/3d/zone_manager.cpp +++ b/code/nel/src/3d/zone_manager.cpp @@ -170,7 +170,7 @@ bool CZoneManager::isWorkComplete (CZoneManager::SZoneManagerWork &rWork) rWork.NameZoneAdded = ite->ZoneToAddName; rWork.ZoneRemoved = false; rWork.IdZoneToRemove = 0; - rWork.NameZoneRemoved = ""; + rWork.NameZoneRemoved.clear(); rWork.Zone = const_cast(ite->Zone); _LoadedZones.push_back (ite->ZoneToAddId); @@ -187,7 +187,7 @@ bool CZoneManager::isWorkComplete (CZoneManager::SZoneManagerWork &rWork) { _RemovingZone = false; rWork.ZoneAdded = false; - rWork.NameZoneAdded = ""; + rWork.NameZoneAdded.clear(); rWork.ZoneRemoved = true; rWork.IdZoneToRemove = _IdZoneToRemove; rWork.NameZoneRemoved = getZoneNameFromId(_IdZoneToRemove); diff --git a/code/nel/src/georges/form_dfn.cpp b/code/nel/src/georges/form_dfn.cpp index 16ee74d5b..114a3aaf1 100644 --- a/code/nel/src/georges/form_dfn.cpp +++ b/code/nel/src/georges/form_dfn.cpp @@ -498,7 +498,7 @@ void CFormDfn::CEntry::setDfn (CFormLoader &loader, const char *filename) void CFormDfn::CEntry::setDfnPointer () { TypeElement = EntryVirtualDfn; - Filename = ""; + Filename.clear(); Type = NULL; Dfn = NULL; } diff --git a/code/nel/src/georges/form_elm.cpp b/code/nel/src/georges/form_elm.cpp index 01e4010e2..1c752b0bc 100644 --- a/code/nel/src/georges/form_elm.cpp +++ b/code/nel/src/georges/form_elm.cpp @@ -1512,7 +1512,7 @@ const char* CFormElm::tokenize (const char *name, string &str, uint &/* errorInd return name+1; } - str = ""; + str.clear(); while ( (*name != '.') && (*name != '[') && (*name != ']') && (*name != 0) ) { // Add a char @@ -2066,7 +2066,7 @@ void CFormElmStruct::getFormName (std::string &result, const CFormElm *child) co // Reset the result if (child == NULL) { - result = ""; + result.clear(); result.reserve (50); } @@ -2723,7 +2723,7 @@ void CFormElmArray::getFormName (std::string &result, const CFormElm *child) con // Reset the result if (child == NULL) { - result = ""; + result.clear(); result.reserve (50); } @@ -3067,7 +3067,7 @@ void CFormElmAtom::getFormName (std::string &result, const CFormElm *child) cons { // Must be NULL nlassert (child == NULL); - result = ""; + result.clear(); result.reserve (50); // Get parent form name diff --git a/code/nel/src/georges/header.cpp b/code/nel/src/georges/header.cpp index ff92d60ea..a2df85cd3 100644 --- a/code/nel/src/georges/header.cpp +++ b/code/nel/src/georges/header.cpp @@ -159,7 +159,7 @@ void CFileHeader::read (xmlNodePtr root) } // Look for the comment node - Comments = ""; + Comments.clear(); xmlNodePtr node = CIXml::getFirstChildNode (root, "COMMENTS"); if (node) { @@ -181,7 +181,7 @@ void CFileHeader::read (xmlNodePtr root) } // Look for the log node - Log = ""; + Log.clear(); node = CIXml::getFirstChildNode (root, "LOG"); if (node) { diff --git a/code/nel/src/georges/type.cpp b/code/nel/src/georges/type.cpp index f401c7ee8..5867f1282 100644 --- a/code/nel/src/georges/type.cpp +++ b/code/nel/src/georges/type.cpp @@ -185,7 +185,7 @@ void CType::read (xmlNodePtr root) xmlFree ((void*)value); } else - Default = ""; + Default.clear(); // Read Min value = (const char*)xmlGetProp (root, (xmlChar*)"Min"); @@ -197,7 +197,7 @@ void CType::read (xmlNodePtr root) xmlFree ((void*)value); } else - Min = ""; + Min.clear(); // Read Max value = (const char*)xmlGetProp (root, (xmlChar*)"Max"); @@ -209,7 +209,7 @@ void CType::read (xmlNodePtr root) xmlFree ((void*)value); } else - Max = ""; + Max.clear(); // Read Increment value = (const char*)xmlGetProp (root, (xmlChar*)"Increment"); @@ -221,7 +221,7 @@ void CType::read (xmlNodePtr root) xmlFree ((void*)value); } else - Increment = ""; + Increment.clear(); // Read the definitions uint childrenCount = CIXml::countChildren (root, "DEFINITION"); @@ -465,7 +465,7 @@ uint getNextToken (const char *startString, string &token, uint &offset) offset += 9; return NL_TOKEN_NAME; } - token = ""; + token.clear(); while (startString[offset]) { if (startString[offset] == '\\') diff --git a/code/nel/src/gui/group_editbox.cpp b/code/nel/src/gui/group_editbox.cpp index 48347aed1..4ac977803 100644 --- a/code/nel/src/gui/group_editbox.cpp +++ b/code/nel/src/gui/group_editbox.cpp @@ -1768,7 +1768,7 @@ namespace NLGUI // *************************************************************************** void CGroupEditBox::clearAllEditBox() { - _InputString = ""; + _InputString.clear(); _CursorPos = 0; _CursorAtPreviousLineEnd = false; if (!_ViewText) return; diff --git a/code/nel/src/gui/group_html.cpp b/code/nel/src/gui/group_html.cpp index 2e77b091b..eee811d02 100644 --- a/code/nel/src/gui/group_html.cpp +++ b/code/nel/src/gui/group_html.cpp @@ -2089,10 +2089,10 @@ namespace NLGUI templateName = value[MY_HTML_TEXTAREA_Z_INPUT_TMPL]; // Get the string name - _TextAreaName = ""; + _TextAreaName.clear(); _TextAreaRow = 1; _TextAreaCols = 10; - _TextAreaContent = ""; + _TextAreaContent.clear(); _TextAreaMaxLength = 1024; if (present[MY_HTML_TEXTAREA_NAME] && value[MY_HTML_TEXTAREA_NAME]) _TextAreaName = value[MY_HTML_TEXTAREA_NAME]; @@ -2112,7 +2112,7 @@ namespace NLGUI if(!_TitlePrefix.empty()) _TitleString = _TitlePrefix + " - "; else - _TitleString = ""; + _TitleString.clear(); _Title = true; } break; @@ -2144,10 +2144,10 @@ namespace NLGUI endParagraph(); break; case HTML_OBJECT: - _ObjectType = ""; - _ObjectData = ""; - _ObjectMD5Sum = ""; - _ObjectAction = ""; + _ObjectType.clear(); + _ObjectData.clear(); + _ObjectMD5Sum.clear(); + _ObjectAction.clear(); if (present[HTML_OBJECT_TYPE] && value[HTML_OBJECT_TYPE]) _ObjectType = value[HTML_OBJECT_TYPE]; if (present[HTML_OBJECT_DATA] && value[HTML_OBJECT_DATA]) @@ -2369,7 +2369,7 @@ namespace NLGUI { endParagraph(); } - _DivName = ""; + _DivName.clear(); popIfNotEmpty (_Divs); popIfNotEmpty (_BlockLevelElement); break; @@ -2614,7 +2614,7 @@ namespace NLGUI { CLuaManager::getInstance().executeLuaScript("\nlocal __ALLREADYDL__=true\n"+_ObjectScript, true); } - _ObjectScript = ""; + _ObjectScript.clear(); } } _Object = false; @@ -2632,7 +2632,7 @@ namespace NLGUI { // we receive an embeded lua script _ParsingLua = _TrustedDomain; // Only parse lua if TrustedDomain - _LuaScript = ""; + _LuaScript.clear(); } } @@ -2687,8 +2687,6 @@ namespace NLGUI _LI = false; _SelectOption = false; _GroupListAdaptor = NULL; - _DocumentUrl = ""; - _DocumentDomain = ""; _UrlFragment.clear(); _RefreshUrl.clear(); _NextRefreshTime = 0.0; @@ -2741,7 +2739,6 @@ namespace NLGUI DefaultCheckBoxBitmapOver = "checkbox_over.tga"; DefaultRadioButtonBitmapNormal = "w_radiobutton.png"; DefaultRadioButtonBitmapPushed = "w_radiobutton_pushed.png"; - DefaultRadioButtonBitmapOver = ""; DefaultBackgroundBitmapView = "bg"; clearContext(); @@ -5825,7 +5822,7 @@ namespace NLGUI if (it->second == "monospace") style.FontFamily = "monospace"; else - style.FontFamily = ""; + style.FontFamily.clear(); } else if (it->first == "font-weight") diff --git a/code/nel/src/gui/group_list.cpp b/code/nel/src/gui/group_list.cpp index e75f8787e..8869c4498 100644 --- a/code/nel/src/gui/group_list.cpp +++ b/code/nel/src/gui/group_list.cpp @@ -363,7 +363,7 @@ namespace NLGUI uint32 i; if( fromString( value, i ) ) _TextId = i; - _HardText = ""; + _HardText.clear(); onTextChanged(); return; } diff --git a/code/nel/src/gui/group_menu.cpp b/code/nel/src/gui/group_menu.cpp index 7ab5db84c..80117e5bd 100644 --- a/code/nel/src/gui/group_menu.cpp +++ b/code/nel/src/gui/group_menu.cpp @@ -266,7 +266,7 @@ namespace NLGUI else if (stricmp((char*)cur->name, "action") == 0) { - string strId, strAh, strParams, strCond, strTexture=""; + string strId, strAh, strParams, strCond, strTexture; ucstring ucstrName; if (id) strId = (const char*)id; @@ -1077,7 +1077,7 @@ namespace NLGUI for (uint32 i = 0; i < pCurGSM->_Lines.size(); ++i) if (sRest == pCurGSM->_Lines[i].Id) return pCurGSM->_Lines[i].ViewText; - sRest = ""; + sRest.clear(); } else // no a lot of token left { diff --git a/code/nel/src/gui/group_paragraph.cpp b/code/nel/src/gui/group_paragraph.cpp index 9e065c878..6261656aa 100644 --- a/code/nel/src/gui/group_paragraph.cpp +++ b/code/nel/src/gui/group_paragraph.cpp @@ -337,7 +337,7 @@ namespace NLGUI if( fromString( value, i ) ) { _TextId = i; - _HardText = ""; + _HardText.clear(); } onTextChanged(); return; diff --git a/code/nel/src/gui/group_tree.cpp b/code/nel/src/gui/group_tree.cpp index 1b80ee84b..b8e2ae1f4 100644 --- a/code/nel/src/gui/group_tree.cpp +++ b/code/nel/src/gui/group_tree.cpp @@ -765,7 +765,7 @@ namespace NLGUI rVR.getTextureSizeFromId(id, _XExtend, dummy); else // if not found, reset, to avoid errors - _ArboXExtend= ""; + _ArboXExtend.clear(); } // ---------------------------------------------------------------------------- diff --git a/code/nel/src/gui/interface_group.cpp b/code/nel/src/gui/interface_group.cpp index 5f4366981..623dfe5bd 100644 --- a/code/nel/src/gui/interface_group.cpp +++ b/code/nel/src/gui/interface_group.cpp @@ -1031,12 +1031,12 @@ namespace NLGUI if (posid > 0) idTmp = idTmp.substr (0, posid); else - idTmp = ""; + idTmp.clear(); if (poslid > 0) lidTmp = lidTmp.substr (0, poslid); else - lidTmp = ""; + lidTmp.clear(); } return true; } diff --git a/code/nel/src/gui/interface_parser.cpp b/code/nel/src/gui/interface_parser.cpp index 068d827bf..4362b5c12 100644 --- a/code/nel/src/gui/interface_parser.cpp +++ b/code/nel/src/gui/interface_parser.cpp @@ -665,7 +665,7 @@ namespace NLGUI if (strchr(ptr, '#') != NULL) { string LastProp = ptr.str(); - string NewProp =""; + string NewProp; string RepProp; while (LastProp.size() > 0) @@ -709,7 +709,7 @@ namespace NLGUI else { NewProp += LastProp; - LastProp = ""; + LastProp.clear(); } } xmlSetProp(node,props->name, (const xmlChar*)NewProp.c_str()); diff --git a/code/nel/src/ligo/primitive.cpp b/code/nel/src/ligo/primitive.cpp index 3fc97fdf5..c94c1609e 100644 --- a/code/nel/src/ligo/primitive.cpp +++ b/code/nel/src/ligo/primitive.cpp @@ -1240,7 +1240,7 @@ const IPrimitive *IPrimitive::getPrimitive (const std::string &absoluteOrRelativ if (indexStr==string::npos) { childName=path; - path=""; + path.clear(); } else { @@ -1664,7 +1664,7 @@ bool IPrimitive::read (xmlNodePtr xmlNode, const char *filename, uint version, C if (commentNode) { if (!CIXml::getContentString(_UnparsedProperties, commentNode)) - _UnparsedProperties = ""; + _UnparsedProperties.clear(); } // Read the expanded flag diff --git a/code/nel/src/ligo/primitive_class.cpp b/code/nel/src/ligo/primitive_class.cpp index 2b32cadec..02923285c 100644 --- a/code/nel/src/ligo/primitive_class.cpp +++ b/code/nel/src/ligo/primitive_class.cpp @@ -183,8 +183,8 @@ bool CPrimitiveClass::read (xmlNodePtr primitiveNode, // init default parameters AutoInit = false; Deletable = true; - FileExtension = ""; - FileType = ""; + FileExtension.clear(); + FileType.clear(); Collision = false; LinkBrothers = false; ShowArrow = true; @@ -351,16 +351,16 @@ bool CPrimitiveClass::read (xmlNodePtr primitiveNode, parameter.WidgetHeight = (uint)temp; // Read the file extension - parameter.FileExtension = ""; + parameter.FileExtension.clear(); CIXml::getPropertyString (parameter.FileExtension, paramNode, "FILE_EXTENSION"); parameter.FileExtension = toLower(parameter.FileExtension); // Autonaming preference - parameter.Autoname = ""; + parameter.Autoname.clear(); CIXml::getPropertyString (parameter.Autoname, paramNode, "AUTONAME"); // Read the file extension - parameter.Folder = ""; + parameter.Folder.clear(); CIXml::getPropertyString (parameter.Folder, paramNode, "FOLDER"); parameter.Folder = toLower(parameter.Folder); @@ -650,7 +650,7 @@ void CPrimitiveClass::CParameter::CConstStringValue::getPrimitivesForPrimPath (s bool CPrimitiveClass::CParameter::translateAutoname (std::string &result, const IPrimitive &primitive, const CPrimitiveClass &primitiveClass) const { - result = ""; + result.clear(); string::size_type strBegin = 0; string::size_type strEnd = 0; while (strBegin != Autoname.size()) @@ -745,7 +745,7 @@ bool CPrimitiveClass::CParameter::translateAutoname (std::string &result, const bool CPrimitiveClass::CParameter::getDefaultValue (std::string &result, const IPrimitive &primitive, const CPrimitiveClass &primitiveClass, std::string *fromWhere) const { - result = ""; + result.clear(); if (!Autoname.empty()) { if (fromWhere) diff --git a/code/nel/src/ligo/zone_bank.cpp b/code/nel/src/ligo/zone_bank.cpp index 6d5de79e8..a72d1a98f 100644 --- a/code/nel/src/ligo/zone_bank.cpp +++ b/code/nel/src/ligo/zone_bank.cpp @@ -88,7 +88,7 @@ void CZoneBankElement::convertSize() } fromString(sTmp, _SizeX); - ++i; sTmp = ""; + ++i; sTmp.clear(); for (; i < sizeString.size(); ++i) { sTmp += sizeString[i]; diff --git a/code/nel/src/misc/debug.cpp b/code/nel/src/misc/debug.cpp index fa1509fe4..01fe6257a 100644 --- a/code/nel/src/misc/debug.cpp +++ b/code/nel/src/misc/debug.cpp @@ -453,7 +453,7 @@ public: string shortExc, longExc, subject; string addr, ext; ULONG_PTR skipNFirst = 0; - _Reason = ""; + _Reason.clear(); if (m_pexp == NULL) { @@ -491,25 +491,25 @@ public: case EXCEPTION_STACK_OVERFLOW : shortExc="Stack Overflow"; longExc="Stack overflow. Can occur during errant recursion, or when a function creates a particularly large array on the stack"; break; case EXCEPTION_INVALID_DISPOSITION : shortExc="Invalid Disposition"; longExc="Whatever number the exception filter returned, it wasn't a value the OS knows about"; break; case EXCEPTION_GUARD_PAGE : shortExc="Guard Page"; longExc="Memory Allocated as PAGE_GUARD by VirtualAlloc() has been accessed"; break; - case EXCEPTION_INVALID_HANDLE : shortExc="Invalid Handle"; longExc=""; break; + case EXCEPTION_INVALID_HANDLE : shortExc="Invalid Handle"; longExc.clear(); break; case CONTROL_C_EXIT : shortExc="Control-C"; longExc="Lets the debugger know the user hit Ctrl-C. Seemingly for console apps only"; break; case STATUS_NO_MEMORY : shortExc="No Memory"; longExc="Called by HeapAlloc() if you specify HEAP_GENERATE_EXCEPTIONS and there is no memory or heap corruption"; ext = ", unable to allocate "; ext += toString ("%d bytes", m_pexp->ExceptionRecord->ExceptionInformation [0]); break; - case STATUS_WAIT_0 : shortExc="Wait 0"; longExc=""; break; - case STATUS_ABANDONED_WAIT_0 : shortExc="Abandoned Wait 0"; longExc=""; break; + case STATUS_WAIT_0 : shortExc="Wait 0"; longExc.clear(); break; + case STATUS_ABANDONED_WAIT_0 : shortExc="Abandoned Wait 0"; longExc.clear(); break; case STATUS_USER_APC : shortExc="User APC"; longExc="A user APC was delivered to the current thread before the specified Timeout interval expired"; break; - case STATUS_TIMEOUT : shortExc="Timeout"; longExc=""; break; - case STATUS_PENDING : shortExc="Pending"; longExc=""; break; - case STATUS_SEGMENT_NOTIFICATION : shortExc="Segment Notification"; longExc=""; break; - case STATUS_FLOAT_MULTIPLE_FAULTS : shortExc="Float Multiple Faults"; longExc=""; break; - case STATUS_FLOAT_MULTIPLE_TRAPS : shortExc="Float Multiple Traps"; longExc=""; break; + case STATUS_TIMEOUT : shortExc="Timeout"; longExc.clear(); break; + case STATUS_PENDING : shortExc="Pending"; longExc.clear(); break; + case STATUS_SEGMENT_NOTIFICATION : shortExc="Segment Notification"; longExc.clear(); break; + case STATUS_FLOAT_MULTIPLE_FAULTS : shortExc="Float Multiple Faults"; longExc.clear(); break; + case STATUS_FLOAT_MULTIPLE_TRAPS : shortExc="Float Multiple Traps"; longExc.clear(); break; #ifdef NL_COMP_VC6 - case STATUS_ILLEGAL_VLM_REFERENCE : shortExc="Illegal VLM Reference"; longExc=""; break; + case STATUS_ILLEGAL_VLM_REFERENCE : shortExc="Illegal VLM Reference"; longExc.clear(); break; #endif case 0xE06D7363 : shortExc="Microsoft C++ Exception"; longExc="Microsoft C++ Exception"; break; // cpp exception - case 0xACE0ACE : shortExc=""; longExc=""; + case 0xACE0ACE : shortExc.clear(); longExc.clear(); if (m_pexp->ExceptionRecord->NumberParameters == 1) skipNFirst = m_pexp->ExceptionRecord->ExceptionInformation [0]; break; // just want the stack @@ -824,7 +824,7 @@ public: // replace param with the value of the stack for this param string parse = str; - str = ""; + str.clear(); uint pos2 = 0; sint stop = 0; @@ -943,7 +943,7 @@ public: str += tmp; } str += parse[i]; - type = ""; + type.clear(); } else { diff --git a/code/nel/src/misc/dynloadlib.cpp b/code/nel/src/misc/dynloadlib.cpp index fadf2e249..66f774fa2 100644 --- a/code/nel/src/misc/dynloadlib.cpp +++ b/code/nel/src/misc/dynloadlib.cpp @@ -255,7 +255,7 @@ void CLibrary::freeLibrary() _PureNelLibrary = NULL; _LibHandle = NULL; _Ownership = false; - _LibFileName = ""; + _LibFileName.clear(); } } diff --git a/code/nel/src/misc/eid_translator.cpp b/code/nel/src/misc/eid_translator.cpp index 591b9db7a..0d126de50 100644 --- a/code/nel/src/misc/eid_translator.cpp +++ b/code/nel/src/misc/eid_translator.cpp @@ -587,10 +587,10 @@ void CEntityIdTranslator::getEntityIdInfo (const CEntityId &eid, ucstring &entit if (it == RegisteredEntities.end ()) { nlwarning ("EIT: %s is not registered in CEntityIdTranslator", reid.toString().c_str()); - entityName = ""; + entityName.clear(); entitySlot = -1; uid = std::numeric_limits::max(); - userName = ""; + userName.clear(); online = false; } else diff --git a/code/nel/src/misc/file.cpp b/code/nel/src/misc/file.cpp index 01c417635..727c02f83 100644 --- a/code/nel/src/misc/file.cpp +++ b/code/nel/src/misc/file.cpp @@ -550,7 +550,6 @@ uint CIFile::getDbgStreamSize() const COFile::COFile() : IStream(false) { _F=NULL; - _FileName = ""; } // ====================================================================================================== diff --git a/code/nel/src/misc/i_xml.cpp b/code/nel/src/misc/i_xml.cpp index fbd8f5d9f..3c8a3c6ba 100644 --- a/code/nel/src/misc/i_xml.cpp +++ b/code/nel/src/misc/i_xml.cpp @@ -67,7 +67,6 @@ CIXml::CIXml () : IStream (true /* Input mode */) _CurrentNode = NULL; _PushBegin = false; _AttribPresent = false; - _ErrorString = ""; _TryBinaryMode = false; _BinaryStream = NULL; } @@ -82,7 +81,6 @@ CIXml::CIXml (bool tryBinaryMode) : IStream (true /* Input mode */) _CurrentNode = NULL; _PushBegin = false; _AttribPresent = false; - _ErrorString = ""; _TryBinaryMode = tryBinaryMode; _BinaryStream = NULL; } @@ -116,7 +114,7 @@ void CIXml::release () _CurrentNode = NULL; _PushBegin = false; _AttribPresent = false; - _ErrorString = ""; + _ErrorString.clear(); resetPtrTable(); } @@ -195,7 +193,7 @@ bool CIXml::init (IStream &stream) } // Set error handler - _ErrorString = ""; + _ErrorString.clear(); xmlSetGenericErrorFunc (this, xmlGenericErrorFuncRead); // Ask to get debug info @@ -319,7 +317,7 @@ void CIXml::serialSeparatedBufferIn ( string &value, bool checkSeparator ) // If no more node, empty string if (_CurrentNode == NULL) { - value = ""; + value.clear(); _ContentStringIndex = 0; _ContentString.erase (); return; diff --git a/code/nel/src/misc/log.cpp b/code/nel/src/misc/log.cpp index 08f6b3107..4efae637a 100644 --- a/code/nel/src/misc/log.cpp +++ b/code/nel/src/misc/log.cpp @@ -377,11 +377,11 @@ void CLog::displayRawString (const char *str) { localargs.Date = 0; localargs.LogType = CLog::LOG_NO; - localargs.ProcessName = ""; + localargs.ProcessName.clear(); localargs.ThreadId = 0; localargs.FileName = NULL; localargs.Line = -1; - localargs.CallstackAndLog = ""; + localargs.CallstackAndLog.clear(); TempString = str; } @@ -397,11 +397,11 @@ void CLog::displayRawString (const char *str) { localargs.Date = 0; localargs.LogType = CLog::LOG_NO; - localargs.ProcessName = ""; + localargs.ProcessName.clear(); localargs.ThreadId = 0; localargs.FileName = NULL; localargs.Line = -1; - localargs.CallstackAndLog = ""; + localargs.CallstackAndLog.clear(); disp = str; args = &localargs; diff --git a/code/nel/src/misc/mem_displayer.cpp b/code/nel/src/misc/mem_displayer.cpp index b8f4f2ea3..c2d7049de 100644 --- a/code/nel/src/misc/mem_displayer.cpp +++ b/code/nel/src/misc/mem_displayer.cpp @@ -85,7 +85,7 @@ static string getFuncInfo (DWORD_TYPE funcAddr, DWORD_TYPE stackAddr) // replace param with the value of the stack for this param string parse = str; - str = ""; + str.clear(); uint pos = 0; sint stop = 0; diff --git a/code/nel/src/misc/o_xml.cpp b/code/nel/src/misc/o_xml.cpp index 6df48ef80..ec121b2b5 100644 --- a/code/nel/src/misc/o_xml.cpp +++ b/code/nel/src/misc/o_xml.cpp @@ -134,7 +134,7 @@ COXml::COXml () : IStream (false /* Output mode */) _CurrentNode = NULL; // Content string - _ContentString = ""; + _ContentString.clear(); // Push begin _PushBegin = false; @@ -160,7 +160,7 @@ bool COXml::init (IStream *stream, const char *version) if (!stream->isReading()) { // Set error handler - _ErrorString = ""; + _ErrorString.clear(); xmlSetGenericErrorFunc (this, xmlGenericErrorFuncWrite); // Set XML mode @@ -179,7 +179,7 @@ bool COXml::init (IStream *stream, const char *version) _CurrentNode = NULL; // Content string - _ContentString = ""; + _ContentString.clear(); // Push begin _PushBegin = false; diff --git a/code/nel/src/misc/string_mapper.cpp b/code/nel/src/misc/string_mapper.cpp index cf8a38e49..7177b062b 100644 --- a/code/nel/src/misc/string_mapper.cpp +++ b/code/nel/src/misc/string_mapper.cpp @@ -33,8 +33,7 @@ CStringMapper CStringMapper::_GlobalMapper; // **************************************************************************** CStringMapper::CStringMapper() { - _EmptyId = new string; - *_EmptyId = ""; + _EmptyId = new string(); } // **************************************************************************** diff --git a/code/nel/src/misc/system_info.cpp b/code/nel/src/misc/system_info.cpp index b78389064..9bea47e29 100644 --- a/code/nel/src/misc/system_info.cpp +++ b/code/nel/src/misc/system_info.cpp @@ -1525,7 +1525,7 @@ NLMISC_CATEGORISED_DYNVARIABLE(nel, string, AvailableHDSpace, "Hard drive space if (get) { *pointer = (CSystemInfo::availableHDSpace(location)); - location = ""; + location.clear(); } else { diff --git a/code/nel/src/misc/task_manager.cpp b/code/nel/src/misc/task_manager.cpp index 4cdb16bd0..c4ec29288 100644 --- a/code/nel/src/misc/task_manager.cpp +++ b/code/nel/src/misc/task_manager.cpp @@ -37,7 +37,7 @@ CTaskManager::CTaskManager() : _RunningTask (""), _TaskQueue (""), _DoneTaskQueu _IsTaskRunning = false; _ThreadRunning = true; CSynchronized::CAccessor currentTask(&_RunningTask); - currentTask.value () = ""; + currentTask.value ().clear(); _Thread = IThread::create(this); _Thread->start(); _ChangePriorityCallback = NULL; @@ -111,7 +111,7 @@ void CTaskManager::run(void) CSynchronized::CAccessor currentTask(&_RunningTask); CSynchronized >::CAccessor doneTask(&_DoneTaskQueue); doneTask.value().push_front (currentTask.value ()); - currentTask.value () = ""; + currentTask.value ().clear(); if (doneTask.value().size () > NLMISC_DONE_TASK_SIZE) doneTask.value().resize (NLMISC_DONE_TASK_SIZE); } diff --git a/code/nel/src/misc/win_displayer.cpp b/code/nel/src/misc/win_displayer.cpp index 37db08fbf..b157448ec 100644 --- a/code/nel/src/misc/win_displayer.cpp +++ b/code/nel/src/misc/win_displayer.cpp @@ -156,7 +156,7 @@ LRESULT CALLBACK WndProc (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) string str; while (*pos2 != '\0') { - str = ""; + str.clear(); // get the string while (*pos2 != '\0' && *pos2 != '\n') diff --git a/code/nel/src/net/admin.cpp b/code/nel/src/net/admin.cpp index 89981a697..625523ea5 100644 --- a/code/nel/src/net/admin.cpp +++ b/code/nel/src/net/admin.cpp @@ -381,7 +381,7 @@ void serviceGetView (uint32 rid, const string &rawvarpath, TAdminViewResult &ans if (CCommandRegistry::getInstance().isNamedCommandHandler(varpath.Destination[0].first)) { varpath.Destination[0].first += "."+varpath.Destination[0].second; - varpath.Destination[0].second = ""; + varpath.Destination[0].second.clear(); } if (varpath.isFinal()) diff --git a/code/nel/src/net/buf_sock.cpp b/code/nel/src/net/buf_sock.cpp index 8dc80a41d..b3d6d7acb 100644 --- a/code/nel/src/net/buf_sock.cpp +++ b/code/nel/src/net/buf_sock.cpp @@ -84,7 +84,7 @@ CBufSock::~CBufSock() delete Sock; // the socket disconnects automatically if needed // destroy the structur to be sure that other people will not access to this anymore - AuthorizedCallback = ""; + AuthorizedCallback.clear(); Sock = NULL; _KnowConnected = false; _LastFlushTime = 0; diff --git a/code/nel/src/net/login_client.cpp b/code/nel/src/net/login_client.cpp index 71ffc6825..0f4383e16 100644 --- a/code/nel/src/net/login_client.cpp +++ b/code/nel/src/net/login_client.cpp @@ -127,7 +127,7 @@ string CLoginClient::authenticate(const string &loginServiceAddr, const ucstring string CLoginClient::authenticateBegin(const string &loginServiceAddr, const ucstring &login, const string &cpassword, const string &application) { - VerifyLoginPasswordReason = ""; + VerifyLoginPasswordReason.clear(); VerifyLoginPassword = false; // S01: connect to the LS @@ -355,7 +355,7 @@ string CLoginClient::selectShardBegin(sint32 shardId) { nlassert(_LSCallbackClient != 0 && _LSCallbackClient->connected()); - ShardChooseShardReason = ""; + ShardChooseShardReason.clear(); ShardChooseShard = false; if (ShardList.empty()) diff --git a/code/nel/src/net/login_server.cpp b/code/nel/src/net/login_server.cpp index 5bd6dfd34..ff7d992c4 100644 --- a/code/nel/src/net/login_server.cpp +++ b/code/nel/src/net/login_server.cpp @@ -157,7 +157,7 @@ void cbWSChooseShard (CMessage &msgin, const std::string &/* serviceName */, TSe // add it to the awaiting client nlinfo ("LS: New cookie %s (name '%s' priv '%s' extended '%s' instance %u slot %u) inserted in the pending user list (awaiting new client)", cookie.toString().c_str(), userName.c_str(), userPriv.c_str(), userExtended.c_str(), instanceId, charSlot); PendingUsers.push_back (CPendingUser (cookie, userName, userPriv, userExtended, instanceId, charSlot)); - reason = ""; + reason.clear(); // callback if needed if (NewCookieCallback != NULL) @@ -233,7 +233,7 @@ void cbShardValidation (CMessage &msgin, TSockId from, CCallbackNetBase &netbase // if the cookie is not valid and we accept them, clear the error if(AcceptInvalidCookie && !reason.empty()) { - reason = ""; + reason.clear(); cookie.set (rand(), rand(), rand()); } @@ -425,7 +425,8 @@ void CLoginServer::addNewCookieCallback(TNewCookieCallback newCookieCb) string CLoginServer::isValidCookie (const CLoginCookie &lc, string &userName, string &userPriv, string &userExtended, uint32 &instanceId, uint32 &charSlot) { - userName = userPriv = ""; + userName.clear(); + userPriv.clear(); if (!AcceptInvalidCookie && !lc.isValid()) return "The cookie is invalid"; diff --git a/code/nel/src/net/message_recorder.cpp b/code/nel/src/net/message_recorder.cpp index 2f27be151..7b5412492 100644 --- a/code/nel/src/net/message_recorder.cpp +++ b/code/nel/src/net/message_recorder.cpp @@ -159,7 +159,7 @@ void CMessageRecorder::recordNext( sint64 updatecounter, TNetworkEvent event, TS void CMessageRecorder::stopRecord() { _File.close(); - _Filename = ""; + _Filename.clear(); } @@ -395,7 +395,7 @@ TNetworkEvent CMessageRecorder::replayConnectionAttempt( const CInetAddress& add void CMessageRecorder::stopReplay() { _File.close(); - _Filename = ""; + _Filename.clear(); } diff --git a/code/nel/src/net/service.cpp b/code/nel/src/net/service.cpp index 989f94d81..24064db55 100644 --- a/code/nel/src/net/service.cpp +++ b/code/nel/src/net/service.cpp @@ -1453,7 +1453,7 @@ sint IService::main (const char *serviceShortName, const char *serviceLongName, } if (dispName.empty()) - str = ""; + str.clear(); else str = dispName + ": "; diff --git a/code/nel/src/net/varpath.cpp b/code/nel/src/net/varpath.cpp index 729f52074..4fc52c341 100644 --- a/code/nel/src/net/varpath.cpp +++ b/code/nel/src/net/varpath.cpp @@ -167,7 +167,7 @@ void CVarPath::decode () if (val == "=") { srv += val + RawVarPath.substr (TokenPos); - var = ""; + var.clear(); } else var = RawVarPath.substr (TokenPos); diff --git a/code/nel/src/pacs/build_indoor.cpp b/code/nel/src/pacs/build_indoor.cpp index b4bad19a6..ca14eb7cf 100644 --- a/code/nel/src/pacs/build_indoor.cpp +++ b/code/nel/src/pacs/build_indoor.cpp @@ -631,7 +631,7 @@ bool computeRetriever(CCollisionMeshBuild &cmb, CLocalRetriever &lr, CVector &tr { nlwarning("Edge issues reported !!"); uint i; - error = ""; + error.clear(); for (i=0; igetSource()); diff --git a/code/nel/src/sound/context_sound.cpp b/code/nel/src/sound/context_sound.cpp index d1403c7c9..fe2512ac0 100644 --- a/code/nel/src/sound/context_sound.cpp +++ b/code/nel/src/sound/context_sound.cpp @@ -160,7 +160,7 @@ void CContextSound::init() uint contextArgIndex[SoundContextNbArgs]; bool useRandom = false; bool parseArg = false; - _BaseName = ""; + _BaseName.clear(); //nldebug("Init the context sound %s", _PatternName.c_str()); @@ -190,7 +190,7 @@ void CContextSound::init() nlassertex(nbJoker < SoundContextNbArgs, ("Error will trying to play ContextSound '%s'", _Name.toString().c_str()/*CStringMapper::unmap(_Name).c_str()*/)); fromString(index, contextArgIndex[nbJoker++]); parseArg = false; - index = ""; + index.clear(); } } else if (*first == 'r') diff --git a/code/nel/tools/3d/build_far_bank/build_far_bank.cpp b/code/nel/tools/3d/build_far_bank/build_far_bank.cpp index dfc3f7f65..e625b4e7f 100644 --- a/code/nel/tools/3d/build_far_bank/build_far_bank.cpp +++ b/code/nel/tools/3d/build_far_bank/build_far_bank.cpp @@ -271,7 +271,7 @@ int main (int argc, char **argv) bool _256=(type==CTileBank::_256x256); // Diffuse bitmap filled ? - if (pTile->getRelativeFileName (CTile::diffuse)!="") + if (!pTile->getRelativeFileName (CTile::diffuse).empty()) { // File exist ? string tileFilename = bank.getAbsPath()+CPath::standardizePath(pTile->getRelativeFileName (CTile::diffuse), false); @@ -302,7 +302,7 @@ int main (int argc, char **argv) } // Additive bitmap filled ? - if (pTile->getRelativeFileName (CTile::additive)!="") + if (!pTile->getRelativeFileName (CTile::additive).empty()) { // File exist ? string tileFilename = bank.getAbsPath()+CPath::standardizePath(pTile->getRelativeFileName (CTile::additive), false); @@ -333,7 +333,7 @@ int main (int argc, char **argv) } // Alpha bitmap filled ? - if (pTile->getRelativeFileName (CTile::alpha)!="") + if (!pTile->getRelativeFileName (CTile::alpha).empty()) { // File exist ? string tileFilename = bank.getAbsPath()+CPath::standardizePath(pTile->getRelativeFileName (CTile::alpha), false); diff --git a/code/nel/tools/3d/cluster_viewer/view_cs.cpp b/code/nel/tools/3d/cluster_viewer/view_cs.cpp index 5e31543ca..9e4dc4f80 100644 --- a/code/nel/tools/3d/cluster_viewer/view_cs.cpp +++ b/code/nel/tools/3d/cluster_viewer/view_cs.cpp @@ -175,7 +175,6 @@ void LoadSceneScript (const char *ScriptName, CScene* pScene, vector &D if (ITemp != NULL) { SDispCS dcsTemp; - dcsTemp.Name = ""; for (sint32 i = 0; i < (1+nNbPlus); ++i) dcsTemp.Name += " "; dcsTemp.Name += nameIG; diff --git a/code/nel/tools/3d/ig_lighter/ig_lighter.cpp b/code/nel/tools/3d/ig_lighter/ig_lighter.cpp index a243ad7bc..10cbb076d 100644 --- a/code/nel/tools/3d/ig_lighter/ig_lighter.cpp +++ b/code/nel/tools/3d/ig_lighter/ig_lighter.cpp @@ -227,7 +227,7 @@ int main(int argc, char* argv[]) CGlobalRetriever *globalRetriever= NULL; uint32 grFileDate= 0; uint32 rbankFileDate= 0; - if( grFile!="" && rbankFile!="" ) + if( !grFile.empty() && !rbankFile.empty()) { CIFile fin; // serial the retrieverBank. Exception if not found. diff --git a/code/nel/tools/3d/object_viewer/animation_set_dlg.cpp b/code/nel/tools/3d/object_viewer/animation_set_dlg.cpp index 887a24d9e..2ae6e803b 100644 --- a/code/nel/tools/3d/object_viewer/animation_set_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/animation_set_dlg.cpp @@ -117,7 +117,7 @@ void CAnimationSetDlg::OnAddAnimation () c[path.GetLength()+1]=0; // Path is empty - path = ""; + path.Empty(); } else { diff --git a/code/nel/tools/3d/object_viewer/create_file_dlg.cpp b/code/nel/tools/3d/object_viewer/create_file_dlg.cpp index 7735eef48..64a404f88 100644 --- a/code/nel/tools/3d/object_viewer/create_file_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/create_file_dlg.cpp @@ -139,9 +139,9 @@ void CCreateFileDlg::OnOK() void CCreateFileDlg::OnCancel() { - _Filename = ""; - _Path = ""; - _FullPath = ""; + _Filename.clear(); + _Path.clear(); + _FullPath.clear(); CDialog::OnCancel(); } diff --git a/code/nel/tools/3d/object_viewer/main_frame.cpp b/code/nel/tools/3d/object_viewer/main_frame.cpp index 5a9e4099d..aa24efa36 100644 --- a/code/nel/tools/3d/object_viewer/main_frame.cpp +++ b/code/nel/tools/3d/object_viewer/main_frame.cpp @@ -652,7 +652,7 @@ void CMainFrame::OnFileOpen() c[path.GetLength()+1]=0; // Path is empty - path = ""; + path.Empty(); } else { @@ -745,7 +745,7 @@ void CMainFrame::OnFileSaveconfig() CFileDialog fileDlg( FALSE, _T(".ovcgf"), _T("*.ovcgf"), OFN_HIDEREADONLY|OFN_OVERWRITEPROMPT, szFilter); if (fileDlg.DoModal()==IDOK) { - ObjView->ParticleWorkspaceFilename = ""; + ObjView->ParticleWorkspaceFilename.clear(); CParticleWorkspace *pw = ObjView->getParticleDialog()->getParticleWorkspace(); if (pw && pw->getNumNode() != 0) { diff --git a/code/nel/tools/3d/object_viewer/mesh_dlg.cpp b/code/nel/tools/3d/object_viewer/mesh_dlg.cpp index 237e01d4b..de59b9c2a 100644 --- a/code/nel/tools/3d/object_viewer/mesh_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/mesh_dlg.cpp @@ -166,7 +166,7 @@ void CMeshDlg::updateForMorph() } else { - m_ShapeName = ""; + m_ShapeName.Empty(); } } updateMeshErrorString(); diff --git a/code/nel/tools/3d/object_viewer/object_viewer.cpp b/code/nel/tools/3d/object_viewer/object_viewer.cpp index cd105ff77..4b78b9838 100644 --- a/code/nel/tools/3d/object_viewer/object_viewer.cpp +++ b/code/nel/tools/3d/object_viewer/object_viewer.cpp @@ -1623,7 +1623,7 @@ void CObjectViewer::resetSlots (uint instance) // Set no animation in slot UI for (uint j=0; jSaved.SlotInfo[j].Animation = ""; + _ListInstance[instance]->Saved.SlotInfo[j].Animation.clear(); // Reset the animation list _ListInstance[instance]->Saved.AnimationFileName.clear (); @@ -1743,7 +1743,7 @@ void CObjectViewer::serial (NLMISC::IStream& f) { if (ver <=3) { - ParticleWorkspaceFilename = ""; + ParticleWorkspaceFilename.clear(); } // First instance uint firstInstance = (uint)_ListInstance.size(); @@ -1786,9 +1786,9 @@ void CObjectViewer::serial (NLMISC::IStream& f) { // Add the mesh if (readed[i].SkeletonId != 0xffffffff) - instance = addMesh (serialShape.getShapePointer(), readed[i].ShapeFilename.c_str(), readed[i].SkeletonId + firstInstance, (readed[i].BindBoneName=="")?NULL:readed[i].BindBoneName.c_str()); + instance = addMesh (serialShape.getShapePointer(), readed[i].ShapeFilename.c_str(), readed[i].SkeletonId + firstInstance, (readed[i].BindBoneName.empty())?NULL:readed[i].BindBoneName.c_str()); else - instance = addMesh (serialShape.getShapePointer(), readed[i].ShapeFilename.c_str(), 0xffffffff, (readed[i].BindBoneName=="")?NULL:readed[i].BindBoneName.c_str()); + instance = addMesh (serialShape.getShapePointer(), readed[i].ShapeFilename.c_str(), 0xffffffff, (readed[i].BindBoneName.empty())?NULL:readed[i].BindBoneName.c_str()); } } else @@ -2151,7 +2151,7 @@ uint CObjectViewer::addMesh (NL3D::IShape* pMeshShape, const std::string &meshNa { // Bind bone name uint bindBone = 0xffffffff; - std::string boneName = ""; + std::string boneName; // Name is passed, look for bone if (bindSkelName) @@ -2400,7 +2400,7 @@ void CObjectViewer::setSingleAnimation (NL3D::CAnimation* pAnim, const std::stri // Set the animation in the first slot _ListInstance[instance]->Saved.SlotInfo[0].Animation = name; - _ListInstance[instance]->Saved.SlotInfo[0].Skeleton = ""; + _ListInstance[instance]->Saved.SlotInfo[0].Skeleton.clear(); _ListInstance[instance]->Saved.SlotInfo[0].Offset = 0; _ListInstance[instance]->Saved.SlotInfo[0].StartTime = (int)(pAnim->getBeginTime()*_AnimationDlg->Speed); _ListInstance[instance]->Saved.SlotInfo[0].EndTime = (int)(pAnim->getEndTime()*_AnimationDlg->Speed); @@ -2978,7 +2978,7 @@ void CObjectViewer::loadVegetableLandscapeCfg(NLMISC::CConfigFile &cf) } catch (const EUnknownVar &) { - _VegetableTexture= ""; + _VegetableTexture.clear(); } // vegetable ambient @@ -3088,7 +3088,7 @@ bool CObjectViewer::createVegetableLandscape() try { - if(_VegetableLandscapeTileBank=="") + if(_VegetableLandscapeTileBank.empty()) { throw Exception("Landscape CFG not fully defined"); } diff --git a/code/nel/tools/3d/object_viewer/particle_system_edit.cpp b/code/nel/tools/3d/object_viewer/particle_system_edit.cpp index b3d29c589..17b4892fe 100644 --- a/code/nel/tools/3d/object_viewer/particle_system_edit.cpp +++ b/code/nel/tools/3d/object_viewer/particle_system_edit.cpp @@ -271,9 +271,9 @@ void CParticleSystemEdit::updatePrecomputedBBoxParams() if (!ew) { - m_BBoxX = ""; - m_BBoxY = ""; - m_BBoxZ = ""; + m_BBoxX.Empty(); + m_BBoxY.Empty(); + m_BBoxZ.Empty(); } else { diff --git a/code/nel/tools/3d/object_viewer/particle_workspace.cpp b/code/nel/tools/3d/object_viewer/particle_workspace.cpp index e5823d178..c94948d71 100644 --- a/code/nel/tools/3d/object_viewer/particle_workspace.cpp +++ b/code/nel/tools/3d/object_viewer/particle_workspace.cpp @@ -100,8 +100,8 @@ void CParticleWorkspace::CNode::stickPSToSkeleton(NL3D::CSkeletonModel *skel, void CParticleWorkspace::CNode::unstickPSFromSkeleton() { nlassert(_WS); - _ParentSkelName = ""; - _ParentBoneName = ""; + _ParentSkelName.clear(); + _ParentBoneName.clear(); if (!_PSM) return; if (_ParentSkel) { diff --git a/code/nel/tools/3d/object_viewer/precomputed_rotations_dlg.cpp b/code/nel/tools/3d/object_viewer/precomputed_rotations_dlg.cpp index 978c7e65b..4f1374eb2 100644 --- a/code/nel/tools/3d/object_viewer/precomputed_rotations_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/precomputed_rotations_dlg.cpp @@ -85,7 +85,9 @@ void CPrecomputedRotationsDlg::updateFromReader(void) } else { - m_NbModels = m_RotSpeedMin = m_RotSpeedMax = ""; + m_NbModels.Empty(); + m_RotSpeedMin.Empty(); + m_RotSpeedMax.Empty(); } UpdateData(FALSE); diff --git a/code/nel/tools/3d/object_viewer/skeleton_scale_dlg.cpp b/code/nel/tools/3d/object_viewer/skeleton_scale_dlg.cpp index 06a95c3ae..a7d2b022a 100644 --- a/code/nel/tools/3d/object_viewer/skeleton_scale_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/skeleton_scale_dlg.cpp @@ -502,7 +502,7 @@ void CSkeletonScaleDlg::refreshTextViewWithScale(TScaleId sid, float scale, flo // if different values selected, diff if(diff) { - *_ScaleEdits[sid]= ""; + _ScaleEdits[sid]->Empty(); } // else display text else diff --git a/code/nel/tools/3d/object_viewer/slot_dlg.cpp b/code/nel/tools/3d/object_viewer/slot_dlg.cpp index a82a34594..507c9b4e8 100644 --- a/code/nel/tools/3d/object_viewer/slot_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/slot_dlg.cpp @@ -420,7 +420,7 @@ void CSlotDlg::OnSetAnimation() updateScrollBar (); } else - getSlotInformation ()->Animation = ""; + getSlotInformation ()->Animation.clear(); } refresh (TRUE); } @@ -444,7 +444,7 @@ void CSlotDlg::OnSetSkeleton() if (select.Selection!=-1) getSlotInformation ()->Skeleton = vectString[select.Selection].c_str(); else - getSlotInformation ()->Skeleton = ""; + getSlotInformation ()->Skeleton.clear(); setWindowName (); Invalidate (); diff --git a/code/nel/tools/3d/object_viewer/start_stop_particle_system.cpp b/code/nel/tools/3d/object_viewer/start_stop_particle_system.cpp index 022ee99f0..923c35ed1 100644 --- a/code/nel/tools/3d/object_viewer/start_stop_particle_system.cpp +++ b/code/nel/tools/3d/object_viewer/start_stop_particle_system.cpp @@ -225,7 +225,7 @@ void CStartStopParticleSystem::updateUIFromState() GetDlgItem(IDC_BROWSE_ANIM)->EnableWindow(FALSE); GetDlgItem(IDC_DISPLAY_HELPERS)->EnableWindow(FALSE); GetDlgItem(IDC_CLEAR_ANIM)->EnableWindow(FALSE); - m_TriggerAnim = ""; + m_TriggerAnim.Empty(); } else { @@ -1033,7 +1033,7 @@ void CStartStopParticleSystem::OnBrowseAnim() void CStartStopParticleSystem::OnClearAnim() { // TODO: Add your control notification handler code here - m_TriggerAnim = ""; + m_TriggerAnim.Empty(); _ActiveNode->setTriggerAnim(""); _ParticleDlg->ParticleTreeCtrl->updateCaption(*_ActiveNode); UpdateData(FALSE); diff --git a/code/nel/tools/3d/object_viewer/vegetable_dlg.cpp b/code/nel/tools/3d/object_viewer/vegetable_dlg.cpp index d7796396b..7611b543b 100644 --- a/code/nel/tools/3d/object_viewer/vegetable_dlg.cpp +++ b/code/nel/tools/3d/object_viewer/vegetable_dlg.cpp @@ -293,7 +293,7 @@ void CVegetableDlg::CVegetableDesc::initVegetable(const NL3D::CVegetable &veget void CVegetableDlg::CVegetableDesc::updateVegetableName() { // Build the vegetable Name according to the ShapeName - if(Vegetable->ShapeName=="") + if(Vegetable->ShapeName.empty()) { VegetableName= NL_DefaultVegetName; } @@ -385,7 +385,7 @@ void CVegetableDlg::buildVegetableSet(NL3D::CTileVegetableDesc &vegetSet, bool for(uint i=0;i<_Vegetables.size();i++) { // if don't want to keep ShapeNames, skip them. - if(!keepDefaultShapeName && _Vegetables[i].Vegetable->ShapeName=="") + if(!keepDefaultShapeName && _Vegetables[i].Vegetable->ShapeName.empty()) continue; // if don't want to keep hiden vegetables, skip them. if(!keepHiden && !_Vegetables[i].Visible) diff --git a/code/nel/tools/3d/object_viewer/vegetable_dlg.h b/code/nel/tools/3d/object_viewer/vegetable_dlg.h index 7dc0cbf99..72d588259 100644 --- a/code/nel/tools/3d/object_viewer/vegetable_dlg.h +++ b/code/nel/tools/3d/object_viewer/vegetable_dlg.h @@ -147,7 +147,7 @@ protected: bool loadVegetableSet(NL3D::CTileVegetableDesc &vegetSet, const TCHAR *title); /** build the vegetSet from the current _Vegetables * NB: transform Rotate Angle in Radians. - * \param keepDefaultShapeName if true, then vegetables with a ShapeName=="" are kept. + * \param keepDefaultShapeName if true, then vegetables with a ShapeName.empty() are kept. * \param keepHiden if true, then vegetables maked as hiden in ObjectViewer are kept. */ void buildVegetableSet(NL3D::CTileVegetableDesc &vegetSet, bool keepDefaultShapeName= true, bool keepHiden= true ); diff --git a/code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.cpp b/code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.cpp index 54bc1cc19..fbc379d95 100644 --- a/code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.cpp +++ b/code/nel/tools/3d/object_viewer_widget/src/object_viewer_widget.cpp @@ -502,7 +502,7 @@ namespace NLQT // load and set search paths from config //Modules::config().configSearchPaths(); - _CurrentInstance = ""; + _CurrentInstance.clear(); nlinfo("Scene cleared"); } diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp index 92522d743..0eeebfa52 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_node_properties.cpp @@ -2650,7 +2650,7 @@ void CNelExport::OnNodeProperties (const std::set &listNode) { // Get a string std::string nameLod=CExportNel::getScriptAppData (node, NEL3D_APPDATA_LOD_NAME+name, ""); - if (nameLod!="") + if (!nameLod.empty()) { param.ListLodName.push_back (nameLod); } @@ -2854,7 +2854,7 @@ void CNelExport::OnNodeProperties (const std::set &listNode) param.SoundGroup = DIFFERENT_VALUE_STRING; if (CExportNel::getScriptAppData(node, NEL3D_APPDATA_ENV_FX, "no fx") != param.EnvironmentFX) { - param.EnvironmentFX = ""; + param.EnvironmentFX.clear(); } if ( param.LightGroup != CExportNel::getScriptAppData (node, NEL3D_APPDATA_LM_LIGHT_GROUP, 0) ) @@ -2871,7 +2871,7 @@ void CNelExport::OnNodeProperties (const std::set &listNode) if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_IGNAME, "")!=param.InstanceGroupName) param.InstanceGroupName = DIFFERENT_VALUE_STRING; if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_INTERFACE_FILE, "")!=param.InterfaceFileName) - param.InterfaceFileName = ""; + param.InterfaceFileName.clear(); if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_INTERFACE_THRESHOLD, 0.1f)!=param.InterfaceThreshold) param.InterfaceThreshold = -1; if (CExportNel::getScriptAppData (node, NEL3D_APPDATA_GET_INTERFACE_NORMAL_FROM_SCENE_OBJECTS, 0)!=param.GetInterfaceNormalsFromSceneObjects) @@ -2942,7 +2942,7 @@ void CNelExport::OnNodeProperties (const std::set &listNode) { // Get a string std::string nameLod=CExportNel::getScriptAppData (node, NEL3D_APPDATA_LOD_NAME+name, ""); - if (nameLod!="") + if (!nameLod.empty()) { tmplist.push_back (nameLod); } diff --git a/code/nel/tools/3d/plugin_max/nel_export/nel_export_view.cpp b/code/nel/tools/3d/plugin_max/nel_export/nel_export_view.cpp index 00289b712..6a0587a22 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/nel_export_view.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/nel_export_view.cpp @@ -369,7 +369,7 @@ void CNelExport::viewMesh (TimeValue time) string sTmp = "Object Name: "; sTmp += pNode->GetName(); ProgBar.setLine (0, sTmp); - sTmp = ""; + sTmp.clear(); for (uint32 i = 1; i < 10; ++i) ProgBar.setLine (i, sTmp); sTmp = "Last Error"; @@ -582,8 +582,8 @@ void CNelExport::viewMesh (TimeValue time) NLMISC::clamp(slInfo.CellSurfaceLightSize, 0.001f, 1000000.f); slInfo.CellRaytraceDeltaZ= theExportSceneStruct.SurfaceLightingDeltaZ; // no more add any prefix to the colision identifier. - slInfo.ColIdentifierPrefix= ""; - slInfo.ColIdentifierSuffix= ""; + slInfo.ColIdentifierPrefix.clear(); + slInfo.ColIdentifierSuffix.clear(); // Build RetrieverBank and GlobalRetriever from collisions in scene _ExportNel->computeCollisionRetrieverFromScene(time, slInfo.RetrieverBank, slInfo.GlobalRetriever, slInfo.ColIdentifierPrefix.c_str(), slInfo.ColIdentifierSuffix.c_str(), slInfo.IgFileName); diff --git a/code/nel/tools/3d/plugin_max/nel_export/progress.cpp b/code/nel/tools/3d/plugin_max/nel_export/progress.cpp index 167a4fc14..3f6a2e824 100644 --- a/code/nel/tools/3d/plugin_max/nel_export/progress.cpp +++ b/code/nel/tools/3d/plugin_max/nel_export/progress.cpp @@ -66,7 +66,7 @@ INT_PTR CALLBACK CalculatingDialogCallback ( SendMessage (GetDlgItem (hwndDlg, IDC_STATICTIMELEFT), WM_SETTEXT, 0, (long)temp); SendMessage (GetDlgItem (hwndDlg, IDC_BUTTONCANCEL), WM_PAINT, 0, 0); } - string all = ""; + string all; for (uint32 i = 0; i < 14; ++i) all += pClass->sInfoProgress[i] + "\n"; SendMessage (GetDlgItem (hwndDlg, IDC_STATICINFO), WM_SETTEXT, 0, (long)all.c_str()); diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp index dd204537c..ef84390a1 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/calc_lm.cpp @@ -2436,7 +2436,7 @@ bool CExportNel::calculateLM( CMesh::CMeshBuild *pZeMeshBuild, CMeshBase::CMeshB { string sTmp = "Placement"; gOptions.FeedBack->setLine (3, sTmp); - sTmp = ""; + sTmp.clear(); for(i=4;i<10;++i) gOptions.FeedBack->setLine (i, sTmp); gOptions.FeedBack->update (); diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp index ea713bd66..d7db650cb 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_collision.cpp @@ -391,7 +391,7 @@ void CExportNel::computeCollisionRetrieverFromScene(TimeValue time, // Default: empty retrieverBank/globalRetriever retrieverBank= NULL; globalRetriever= NULL; - retIgName= ""; + retIgName.clear(); // get list of nodes from scene std::vector nodes; diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp index 71e497d03..a745970eb 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_misc.cpp @@ -946,11 +946,11 @@ std::string CExportNel::getAnimatedLight (INode *node) { std::string ret = CExportNel::getScriptAppData (node, NEL3D_APPDATA_LM_ANIMATED_LIGHT, NEL3D_APPDATA_LM_ANIMATED_LIGHT_DEFAULT); if (ret == "Sun") - ret = ""; + ret.clear(); if (ret == "GlobalLight") - ret = ""; + ret.clear(); if (ret == "(Use NelLight Modifier)") - ret = ""; + ret.clear(); return ret; } diff --git a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_scene.cpp b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_scene.cpp index 820f03b06..21f557562 100644 --- a/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_scene.cpp +++ b/code/nel/tools/3d/plugin_max/nel_mesh_lib/export_scene.cpp @@ -715,7 +715,7 @@ void CExportNel::buildScene (NL3D::CScene &scene, NL3D::CShapeBank &shapeBank, I sTmp += pNode->GetName(); if (progress) progress->setLine (0, sTmp); - sTmp = ""; + sTmp.clear(); for (uint32 i = 1; i < 10; ++i) { if (progress) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp b/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp index ae2cd2155..5f492473c 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_converter/script.cpp @@ -1627,7 +1627,7 @@ load_bank_cf(Value** arg_list, int count) // Check to see if the arguments match up to what we expect // We want to use 'TurnAllTexturesOn ' std::string bankName = GetBankPathName (); - if (bankName!="") + if (!bankName.empty()) { try { diff --git a/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.h b/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.h index 2fc14ee0a..e9f3b6b3f 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.h +++ b/code/nel/tools/3d/plugin_max/nel_patch_lib/nel_patch_mesh.h @@ -434,7 +434,6 @@ class CBankManager public: CBankManager () { - _lastPath=""; } const NL3D::CTileBank& getBank (std::string& path=GetBankPathName ()) { diff --git a/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo2nel.cpp b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo2nel.cpp index 87ec430aa..55e8a8c55 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo2nel.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_lib/rpo2nel.cpp @@ -175,7 +175,7 @@ bool RPatchMesh::exportZone(INode* pNode, PatchMesh* pPM, NL3D::CZone& zone, CZo // Get the bank name std::string sName=GetBankPathName (); - if (sName!="") + if (!sName.empty()) { // Open the bank CIFile file; diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp index c2ec65fc2..a9426ed05 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint.cpp @@ -3979,7 +3979,7 @@ void EPM_PaintCMode::DoPaint () std::string sName=GetBankPathName (); - if (sName!="") + if (!sName.empty()) { CIFile file; if (file.open (sName)) diff --git a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.cpp b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.cpp index 413ef88a0..10554f8da 100644 --- a/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.cpp +++ b/code/nel/tools/3d/plugin_max/nel_patch_paint/paint_ui.cpp @@ -168,7 +168,7 @@ void CTileSetCont::build (CTileBank& bank, uint tileSet) std::string fileName=bank.getAbsPath()+bank.getTile (set->getTile128(0))->getRelativeFileName (CTile::diffuse); // Valid name? - if (fileName!="") + if (!fileName.empty()) { // Create it MainBitmap=new CTextureFile (fileName); @@ -193,7 +193,7 @@ void CTileSetCont::build (CTileBank& bank, uint tileSet) std::string fileName=bank.getAbsPath()+pTile->getRelativeFileName (CTile::diffuse); // Valid name? - if (fileName!="") + if (!fileName.empty()) { // Create it if (GroupBitmap[group]==NULL) @@ -218,7 +218,7 @@ void CTileSetCont::build (CTileBank& bank, uint tileSet) std::string fileName=bank.getAbsPath()+pTile->getRelativeFileName (CTile::diffuse); // Valid name? - if (fileName!="") + if (!fileName.empty()) { // Create it if (GroupBitmap[group]==NULL) @@ -250,10 +250,10 @@ void CTileSetCont::build (CTileBank& bank, uint tileSet) // Get the name std::string fileName = bank.getDisplacementMap(dispTile); if (fileName=="EmptyDisplacementMap") - fileName=""; + fileName.clear(); // Valid name? - if (fileName!="") + if (!fileName.empty()) { // Create it DisplaceBitmap[displace]=new CTextureFile (bank.getAbsPath()+fileName); diff --git a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.cpp b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.cpp index 4c4a12f69..7c4605b38 100644 --- a/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.cpp +++ b/code/nel/tools/3d/plugin_max/tile_utility/tile_utility.cpp @@ -443,7 +443,7 @@ bool Tile_utility::SetupMaterial () const mtl->SetShininess (0.0, t); mtl->SetSpecular (Color (0,0,0), t); - if ((tile->getRelativeFileName(CTile::diffuse)!="")||(tile->getRelativeFileName(CTile::additive)!="")) + if (!tile->getRelativeFileName(CTile::diffuse).empty() || !tile->getRelativeFileName(CTile::additive).empty()) { bActive=true; Texmap* rgb=(Texmap*)GetRGBAddDesc()->Create (FALSE); @@ -452,7 +452,7 @@ bool Tile_utility::SetupMaterial () const mtl->SetSubTexmap (ID_DI, rgb); mtl->SubTexmapOn (ID_DI); - if (tile->getRelativeFileName(CTile::diffuse)!="") + if (!tile->getRelativeFileName(CTile::diffuse).empty()) { // New BitmapTex BitmapTex* tex=NewDefaultBitmapTex(); @@ -472,7 +472,7 @@ bool Tile_utility::SetupMaterial () const mtl->NotifyDependents(FOREVER, PART_ALL, REFMSG_CHANGE); } - if (tile->getRelativeFileName(CTile::additive)!="") + if (!tile->getRelativeFileName(CTile::additive).empty()) { // New BitmapTex BitmapTex* tex=NewDefaultBitmapTex(); diff --git a/code/nel/tools/3d/tile_edit/Browse.cpp b/code/nel/tools/3d/tile_edit/Browse.cpp index 6b81ab1ad..9b9b8942e 100644 --- a/code/nel/tools/3d/tile_edit/Browse.cpp +++ b/code/nel/tools/3d/tile_edit/Browse.cpp @@ -546,7 +546,7 @@ unsigned long Browse::MyControllingFunction( void* pParam ) rot = tileBank2.getTile (index)->getRotAlpha (); } else - path = ""; + path.clear(); } break; case 3: @@ -576,7 +576,7 @@ unsigned long Browse::MyControllingFunction( void* pParam ) break; } - if ((path!="") && _LoadBitmap(tileBank2.getAbsPath() + path, pBmp, *bits, pAlpha, rot)) + if (!path.empty() && _LoadBitmap(tileBank2.getAbsPath() + path, pBmp, *bits, pAlpha, rot)) { *ld=1; int iFV,iLV; br->m_ctrl.GetVisibility(iFV, iLV, br->m_128x128); @@ -633,7 +633,7 @@ void Browse::Init() value=256; type=REG_SZ; if (RegQueryValueEx(regkey,REGKEY_LASTPATH,0,&type,(unsigned char *)&sWindowpl,&value)!=ERROR_SUCCESS) - m_ctrl.LastPath=""; + m_ctrl.LastPath.clear(); else m_ctrl.LastPath=(const char*)sWindowpl; value=4; @@ -916,7 +916,7 @@ void Browse::OnBatchLoad () // Transition to patch CTileSetTransition* trans=tileBank2.getTileSet (land)->getTransition (transition); - if (tileBank2.getTile (trans->getTile())->getRelativeFileName (CTile::alpha)=="") + if (tileBank2.getTile (trans->getTile())->getRelativeFileName (CTile::alpha).empty()) { // Continue ? int ok; @@ -958,7 +958,7 @@ void Browse::OnBatchLoad () // Transition to patch CTileSetTransition* trans=tileBank2.getTileSet (land)->getTransition (transition); - if (tileBank2.getTile (trans->getTile())->getRelativeFileName (m_ctrl.Texture==1?CTile::diffuse:CTile::additive)=="") + if (tileBank2.getTile (trans->getTile())->getRelativeFileName (m_ctrl.Texture==1?CTile::diffuse:CTile::additive).empty()) { // Try to load a tile with a file name like /tiletransition0.tga char sName2[256]; diff --git a/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp b/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp index 2193f2892..a7493c62e 100644 --- a/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp +++ b/code/nel/tools/3d/tile_edit/SelectionTerritoire.cpp @@ -577,7 +577,7 @@ void SelectionTerritoire::OnPath() const std::string& bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type); // not empty ? - if (bitmapPath!="") + if (!bitmapPath.empty()) { // Check the path if (CheckPath (bitmapPath, path)==false) @@ -648,7 +648,7 @@ void SelectionTerritoire::OnPath() std::string bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type); // not empty ? - if (bitmapPath!="") + if (!bitmapPath.empty()) { // Remove the absolute path bool res=RemovePath (bitmapPath, path); @@ -668,7 +668,7 @@ void SelectionTerritoire::OnPath() std::string bitmapPath=tileBank.getDisplacementMap (noise); // not empty ? - if (bitmapPath!="") + if (!bitmapPath.empty()) { // Remove the absolute path bool res=RemovePath (bitmapPath, path); diff --git a/code/nel/tools/3d/tile_edit/View.cpp b/code/nel/tools/3d/tile_edit/View.cpp index bbbbec431..d6d24d47c 100644 --- a/code/nel/tools/3d/tile_edit/View.cpp +++ b/code/nel/tools/3d/tile_edit/View.cpp @@ -432,7 +432,7 @@ int TileList::setDisplacement (int tile, const std::string& name) if (RemovePath (troncated, tileBank2.getAbsPath ().c_str())) { // load it - if (troncated!="") + if (!troncated.empty()) { // not loaded theListDisplacement[tile].loaded=0; @@ -670,7 +670,7 @@ const std::string& TileInfo::getRelativeFileName (CTile::TBitmap type, int index bool TileInfo::Load (int index, std::vector* Alpha) { bool bRes=true; - if (!loaded && getRelativeFileName (CTile::diffuse, index)!="") + if (!loaded && !getRelativeFileName (CTile::diffuse, index).empty()) { if (!_LoadBitmap(tileBank2.getAbsPath() + getRelativeFileName (CTile::diffuse, index), &BmpInfo, Bits, Alpha, 0)) { @@ -680,7 +680,7 @@ bool TileInfo::Load (int index, std::vector* Alpha) else loaded=1; } - if (!nightLoaded && getRelativeFileName (CTile::additive, index)!="") + if (!nightLoaded && !getRelativeFileName (CTile::additive, index).empty()) { if (!_LoadBitmap(tileBank2.getAbsPath() + getRelativeFileName (CTile::additive, index), &nightBmpInfo, nightBits, Alpha, 0)) { @@ -690,7 +690,7 @@ bool TileInfo::Load (int index, std::vector* Alpha) else nightLoaded=1; } - if (!alphaLoaded && getRelativeFileName (CTile::alpha, index)!="") + if (!alphaLoaded && !getRelativeFileName (CTile::alpha, index).empty()) { if (!_LoadBitmap(tileBank2.getAbsPath() + getRelativeFileName (CTile::alpha, index), &alphaBmpInfo, alphaBits, NULL, tileBank2.getTile (index)->getRotAlpha ())) @@ -1205,7 +1205,7 @@ void CTView::DrawTile(tilelist::iterator i,CDC *pDC,int clear, int n) if (index!=-1) pth = i->getRelativeFileName ((CTile::TBitmap)(Texture-1), index); else - pth = ""; + pth.clear(); } break; case 3: diff --git a/code/nel/tools/3d/tile_edit/choose_veget_set.cpp b/code/nel/tools/3d/tile_edit/choose_veget_set.cpp index e1a652675..7afa0c1e0 100644 --- a/code/nel/tools/3d/tile_edit/choose_veget_set.cpp +++ b/code/nel/tools/3d/tile_edit/choose_veget_set.cpp @@ -77,8 +77,8 @@ BOOL CChooseVegetSet::OnInitDialog() { CDialog::OnInitDialog(); - if (FileName != "") - Name.SetWindowText (FileName.c_str()); + if (!FileName.empty()) + Name.SetWindowText (utf8ToTStr(FileName)); else Name.SetWindowText ("Browse..."); @@ -88,6 +88,6 @@ BOOL CChooseVegetSet::OnInitDialog() void CChooseVegetSet::OnReset() { - FileName = ""; - Name.SetWindowText ("Browse..."); + FileName.clear(); + Name.SetWindowText (_T("Browse...")); } diff --git a/code/nel/tools/3d/tile_edit_qt/browser_model.cpp b/code/nel/tools/3d/tile_edit_qt/browser_model.cpp index 3f57a69df..eab1b193e 100644 --- a/code/nel/tools/3d/tile_edit_qt/browser_model.cpp +++ b/code/nel/tools/3d/tile_edit_qt/browser_model.cpp @@ -149,7 +149,7 @@ void TileInfo::Init(int id, TileType tileType) bool TileInfo::Load (int index, std::vector* Alpha) { bool bRes=true; - if (!loaded && getRelativeFileName (Diffuse, index)!="") + if (!loaded && !getRelativeFileName (Diffuse, index).empty()) { path = fixPath(tileBankBrowser.getAbsPath() + getRelativeFileName (Diffuse, index)); @@ -164,7 +164,7 @@ bool TileInfo::Load (int index, std::vector* Alpha) else loaded=1; } - if (!nightLoaded && getRelativeFileName (Additive, index)!="") + if (!nightLoaded && !getRelativeFileName (Additive, index).empty()) { nightPath = fixPath(tileBankBrowser.getAbsPath() + getRelativeFileName (Additive, index)); if (!loadPixmapBuffer( nightPath, nightBits, Alpha, 0)) @@ -175,7 +175,7 @@ bool TileInfo::Load (int index, std::vector* Alpha) else nightLoaded=1; } - if (!alphaLoaded && getRelativeFileName (::Alpha, index)!="") + if (!alphaLoaded && !getRelativeFileName (::Alpha, index).empty()) { alphaPath = fixPath(tileBankBrowser.getAbsPath() + getRelativeFileName (::Alpha, index)); if (!loadPixmapBuffer( alphaPath, alphaBits, NULL, tileBankBrowser.getTile (index)->getRotAlpha ())) @@ -234,7 +234,7 @@ const std::string TileInfo::getRelativeFileName (TileTexture texture, int index) //TODO titegus: remove MAGIC STRING "EmptyDisplacementMap" in Nel \tile_bank.cpp\void CTileNoise::setEmpty () or add an IsEmpty() method !!!! if (currentPath == "EmptyDisplacementMap") - currentPath = ""; + currentPath.clear(); } } diff --git a/code/nel/tools/3d/tile_edit_qt/tile_browser_dlg.cpp b/code/nel/tools/3d/tile_edit_qt/tile_browser_dlg.cpp index 83b3d50c3..2d1ca4cbe 100644 --- a/code/nel/tools/3d/tile_edit_qt/tile_browser_dlg.cpp +++ b/code/nel/tools/3d/tile_edit_qt/tile_browser_dlg.cpp @@ -421,7 +421,7 @@ void CTile_browser_dlg::on_batchLoadPushButton_clicked() // Transition to patch CTileSetTransition* trans=tileBankBrowser.getTileSet (tileSetIndex)->getTransition (transition); - if (tileBankBrowser.getTile (trans->getTile())->getRelativeFileName (CTile::alpha)=="") + if (tileBankBrowser.getTile (trans->getTile())->getRelativeFileName (CTile::alpha).empty()) { // Continue ? int ok; @@ -465,7 +465,7 @@ void CTile_browser_dlg::on_batchLoadPushButton_clicked() // Transition to patch //CTileSetTransition* trans=tileBankBrowser.getTileSet (tileSetIndex)->getTransition (transition); - //if (tileBankBrowser.getTile (trans->getTile())->getRelativeFileName ((CTile::TBitmap)tileTextureButtonGroup->checkedId())=="") + //if (tileBankBrowser.getTile (trans->getTile())->getRelativeFileName ((CTile::TBitmap)tileTextureButtonGroup->checkedId()).empty()) //{ // // Try to load a tile with a file name like /tiletransition0.tga // char sName2[256]; diff --git a/code/nel/tools/3d/tile_edit_qt/tile_edit_dlg.cpp b/code/nel/tools/3d/tile_edit_qt/tile_edit_dlg.cpp index 2b6612e9c..bd5bb625a 100644 --- a/code/nel/tools/3d/tile_edit_qt/tile_edit_dlg.cpp +++ b/code/nel/tools/3d/tile_edit_qt/tile_edit_dlg.cpp @@ -514,7 +514,7 @@ void CTile_edit_dlg::on_absolutePathPushButton_clicked() const std::string& bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type); // not empty ? - if (bitmapPath!="") + if (!bitmapPath.empty()) { // Check the path if ( CheckPath( bitmapPath, path.toUtf8() ) == false ) @@ -583,7 +583,7 @@ void CTile_edit_dlg::on_absolutePathPushButton_clicked() std::string bitmapPath=tileBank.getTile(tiles)->getRelativeFileName ((CTile::TBitmap)type); // not empty ? - if (bitmapPath!="") + if (!bitmapPath.empty()) { // Remove the absolute path bool res=RemovePath (bitmapPath, path.toUtf8()); @@ -603,7 +603,7 @@ void CTile_edit_dlg::on_absolutePathPushButton_clicked() std::string bitmapPath=tileBank.getDisplacementMap (noise); // not empty ? - if (bitmapPath!="") + if (!bitmapPath.empty()) { // Remove the absolute path bool res=RemovePath (bitmapPath, path.toUtf8()); diff --git a/code/nel/tools/3d/zviewer/zviewer.cpp b/code/nel/tools/3d/zviewer/zviewer.cpp index c5f4419a4..fc8e00a4c 100644 --- a/code/nel/tools/3d/zviewer/zviewer.cpp +++ b/code/nel/tools/3d/zviewer/zviewer.cpp @@ -135,7 +135,6 @@ struct CViewerConfig LandscapeThreshold = 0.001f; LandscapeNoise = true; - HeightFieldName= ""; HeightFieldMaxZ= 100; HeightFieldOriginX= 16000; HeightFieldOriginY= -24000; @@ -344,7 +343,7 @@ void displayZones() CBitmap heightBitmap; CIFile file(ViewerCfg.HeightFieldName); - if( ViewerCfg.HeightFieldName!="" && heightBitmap.load(file) ) + if( !ViewerCfg.HeightFieldName.empty() && heightBitmap.load(file) ) { CHeightMap heightMap; heightMap.buildFromBitmap(heightBitmap); @@ -373,7 +372,7 @@ void displayZones() nlerror (tmp.c_str()); } - if ((Landscape->Landscape.TileBank.getAbsPath ()=="")&&(ViewerCfg.TilesPath!="")) + if ((Landscape->Landscape.TileBank.getAbsPath ().empty())&&(!ViewerCfg.TilesPath.empty())) Landscape->Landscape.TileBank.setAbsPath (ViewerCfg.TilesPath + "/"); if (ViewerCfg.UseDDS) diff --git a/code/nel/tools/georges/georges2csv/georges2csv.cpp b/code/nel/tools/georges/georges2csv/georges2csv.cpp index 99dd920ef..29fb393c9 100644 --- a/code/nel/tools/georges/georges2csv/georges2csv.cpp +++ b/code/nel/tools/georges/georges2csv/georges2csv.cpp @@ -933,7 +933,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType if ( idm==dirmapDirs.end() ) { nlinfo( "Directory mapping not found for %s (index %u)", filebase.c_str(), letterIndex ); - dirbase = ""; // put into root + dirbase.clear(); // put into root } } else @@ -953,7 +953,7 @@ void convertCsvFile( const string &file, bool generate, const string& sheetType { // Load sheet (skip if failed) - dirbase = ""; + dirbase.clear(); filename = (*it).second; // whole path form = (CForm*)formLoader->loadForm( filename.c_str() ); if (form == NULL) diff --git a/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp b/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp index cfcd82c9f..b3e65653c 100644 --- a/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp +++ b/code/nel/tools/misc/branch_patcher/branch_patcherDlg.cpp @@ -688,8 +688,8 @@ void CBranch_patcherDlg::OnButtonExtractTokens() m_TargetDirLabel = "Target Dir"; m_SrcDir = SrcDirBackup; m_DestDir = TargetDirBackup; - m_Filename = ""; - ((CButton*)GetDlgItem( IDC_ButtonExtractTokens ))->SetWindowText( "Enter Tokens" ); + m_Filename.Empty(); + ((CButton*)GetDlgItem( IDC_ButtonExtractTokens ))->SetWindowText( _T("Enter Tokens") ); GetDlgItem( IDC_TopText )->ShowWindow( SW_SHOW ); GetDlgItem( IDC_ButtonClearTokens )->EnableWindow( TRUE ); GetDlgItem( IDC_ButtonPatch )->ShowWindow( SW_SHOW ); @@ -703,8 +703,8 @@ void CBranch_patcherDlg::OnButtonExtractTokens() void CBranch_patcherDlg::OnButtonClearTokens() { - Token1 = ""; - Token2 = ""; + Token1.Empty(); + Token2.Empty(); displayTokens(); } diff --git a/code/nel/tools/misc/log_analyser/log_analyserDlg.cpp b/code/nel/tools/misc/log_analyser/log_analyserDlg.cpp index b5333edcf..34e7459cb 100644 --- a/code/nel/tools/misc/log_analyser/log_analyserDlg.cpp +++ b/code/nel/tools/misc/log_analyser/log_analyserDlg.cpp @@ -517,7 +517,7 @@ CViewDialog *CLog_analyserDlg::onAddCommon( const vector& filenames ) view->Filenames = filenames; } - view->LogSessionStartDate = ""; + view->LogSessionStartDate.Empty(); LogSessionsDialog.clear(); if ( ((CButton*)GetDlgItem( IDC_CheckSessions ))->GetCheck() == 1 ) diff --git a/code/ryzom/client/src/bg_downloader_access.cpp b/code/ryzom/client/src/bg_downloader_access.cpp index d4aac9169..1a479849e 100644 --- a/code/ryzom/client/src/bg_downloader_access.cpp +++ b/code/ryzom/client/src/bg_downloader_access.cpp @@ -213,7 +213,7 @@ void CBGDownloaderAccess::resumeBackgroundDownload() //===================================================== void CBGDownloaderAccess::CDownloadCoTask::run() { - Parent->_ErrorMsg = ""; + Parent->_ErrorMsg.clear(); try { // don't restart downloader before diff --git a/code/ryzom/client/src/character_cl.cpp b/code/ryzom/client/src/character_cl.cpp index 5d949b201..c66b80576 100644 --- a/code/ryzom/client/src/character_cl.cpp +++ b/code/ryzom/client/src/character_cl.cpp @@ -183,7 +183,7 @@ extern UCamera MainCam; //////////// // STATIC // //////////// -const std::string CCharacterCL::_EmptyString = ""; +const std::string CCharacterCL::_EmptyString; const uint8 CCharacterCL::_BadHairIndex = 0xFF; H_AUTO_DECL ( RZ_Client_Character_CL_Update_Pos_Combat_Float ) diff --git a/code/ryzom/client/src/client_sheets/race_stats_sheet.cpp b/code/ryzom/client/src/client_sheets/race_stats_sheet.cpp index 3a0723f7d..651e9a8ec 100644 --- a/code/ryzom/client/src/client_sheets/race_stats_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/race_stats_sheet.cpp @@ -38,7 +38,7 @@ using namespace std; ///////////// // METHODS // ///////////// -const string CGenderInfo::UnknownItemName = ""; +const string CGenderInfo::UnknownItemName; // description of a visual slot that must be read by CGenderInfo struct CSlotInfo diff --git a/code/ryzom/client/src/client_sheets/unblock_titles_sheet.cpp b/code/ryzom/client/src/client_sheets/unblock_titles_sheet.cpp index 5ed97b2da..6a94f9c7a 100644 --- a/code/ryzom/client/src/client_sheets/unblock_titles_sheet.cpp +++ b/code/ryzom/client/src/client_sheets/unblock_titles_sheet.cpp @@ -44,7 +44,7 @@ static void tokenize (const string &zeString, vector &tokens) if ((nextseppos1 == string::npos) && (nextseppos2 == string::npos)) { tokens.push_back(sTmp); - sTmp = ""; + sTmp.clear(); } else { diff --git a/code/ryzom/client/src/commands.cpp b/code/ryzom/client/src/commands.cpp index 87e052cec..6ea0b055b 100644 --- a/code/ryzom/client/src/commands.cpp +++ b/code/ryzom/client/src/commands.cpp @@ -5236,7 +5236,7 @@ bool CUserCommand::execute(const std::string &/* rawCommandString */, const std: { // Build the final string static string finalArgs; - finalArgs = ""; + finalArgs.clear(); uint i; uint index = 0; const vector &keywords = mode->Keywords; diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 307600084..3d8fbc75c 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -1976,7 +1976,7 @@ public: } } - NewKeysCharNameValidated = ""; + NewKeysCharNameValidated.clear(); NetMngr.push(out); NetMngr.send(NetMngr.getCurrentServerTick()); @@ -2304,8 +2304,8 @@ public: virtual void execute (CCtrlBase * /* pCaller */, const string &/* Params */) { - NewKeysCharNameWanted = ""; - NewKeysCharNameValidated = ""; + NewKeysCharNameWanted.clear(); + NewKeysCharNameValidated.clear(); GameKeySet = "keys.xml"; RingEditorKeySet = "keys_r2ed.xml"; First = true; @@ -3121,10 +3121,10 @@ class CAHLoadScenario : public IActionHandler launchScenarioFromRingAccessPoint = true; } - string rules="", level="", title=""; - string initialIsland="", initialEntryPoint="", initialSeason = ""; - std::string lang="", scenarioType=""; - std::string otherCharAccess=""; + string rules, level, title; + string initialIsland, initialEntryPoint, initialSeason; + std::string lang, scenarioType; + std::string otherCharAccess; std::string nevraxScenario = "0"; std::string trialAllowed = "0"; for(uint i=0; ideleteInstance(Loading); - LoadingName = ""; + LoadingName.clear(); } // if the new instance is NULL, then clean ALL @@ -193,7 +193,7 @@ bool CEntityCL::SInstanceCL::createLoading(const string &strShapeName, const str { releaseStaticFXs(); Scene->deleteInstance(Current); - CurrentName = ""; + CurrentName.clear(); } } // else setup into loading @@ -347,7 +347,7 @@ void CEntityCL::SInstanceCL::updateCurrentFromLoading(NL3D::USkeleton Skeleton) if (!Current.empty()) { Scene->deleteInstance(Current); - CurrentName = ""; + CurrentName.clear(); } @@ -355,7 +355,7 @@ void CEntityCL::SInstanceCL::updateCurrentFromLoading(NL3D::USkeleton Skeleton) Current = Loading; CurrentName = LoadingName; Loading = NULL; - LoadingName = ""; + LoadingName.clear(); // If there is a skeleton, bind the skin to the skeleton. @@ -533,7 +533,6 @@ CEntityCL::CEntityCL() _SelectionFX = NULL; _MouseOverFX = NULL; _StateFX = NULL; - _StateFXName = ""; _GMTitle = _InvalidGMTitleCode; _LastLocalSelectBoxComputeTime = 0; _InSceneInterfaceEnabled = true; @@ -603,7 +602,7 @@ CEntityCL::~CEntityCL() if (!_StateFX.empty() && Scene) { Scene->deleteInstance(_StateFX); - _StateFXName = ""; + _StateFXName.clear(); } if (!_SelectionFX.empty() && Scene) { @@ -751,7 +750,7 @@ void CEntityCL::init() _GroundTypeCache= 0; _StateFX = NULL; - _StateFXName = ""; + _StateFXName.clear(); _SelectionFX = NULL; _MouseOverFX = NULL; @@ -3599,7 +3598,7 @@ void CEntityCL::removeStateFx() if (!_StateFX.empty() && Scene) { Scene->deleteInstance(_StateFX); - _StateFXName = ""; + _StateFXName.clear(); } } diff --git a/code/ryzom/client/src/ground_fx_manager.cpp b/code/ryzom/client/src/ground_fx_manager.cpp index aaadd257b..beca9b9bd 100644 --- a/code/ryzom/client/src/ground_fx_manager.cpp +++ b/code/ryzom/client/src/ground_fx_manager.cpp @@ -209,7 +209,7 @@ struct CCmpGroundIDPred void CGroundFXManager::CInstance::getFXNameFromGroundType(uint32 groundID, std::string &fxName) const { H_AUTO_USE(RZ_GroundFXManager) - fxName= ""; + fxName.clear(); if (!Entity) return; const CEntitySheet *es; es = SheetMngr.get(Entity->sheetId()); diff --git a/code/ryzom/client/src/init.cpp b/code/ryzom/client/src/init.cpp index 3f22ed956..267042b7e 100644 --- a/code/ryzom/client/src/init.cpp +++ b/code/ryzom/client/src/init.cpp @@ -370,7 +370,7 @@ void selectTipsOfTheDay (uint /* tips */) TipsOfTheDay = title+CI18N::get ("uiTips"+toString (tips));*/ // todo tips of the day remove //trap TipsOfTheDay = CI18N::get ("uiMessageOfTheDay"); - TipsOfTheDay = ""; //trap + TipsOfTheDay.clear(); //trap } // *************************************************************************** @@ -1648,7 +1648,7 @@ void postlogInit() else { // To have the same number of newMessage in client light - nmsg = ""; + nmsg.clear(); ProgressBar.newMessage (nmsg); ProgressBar.newMessage (nmsg); ProgressBar.newMessage (nmsg); diff --git a/code/ryzom/client/src/init_main_loop.cpp b/code/ryzom/client/src/init_main_loop.cpp index c9749b4d1..c3f219278 100644 --- a/code/ryzom/client/src/init_main_loop.cpp +++ b/code/ryzom/client/src/init_main_loop.cpp @@ -1191,7 +1191,7 @@ void initMainLoop() } else { - nmsg = ""; + nmsg.clear(); ProgressBar.newMessage (nmsg); ProgressBar.newMessage (nmsg); } diff --git a/code/ryzom/client/src/interface_v3/action_handler_item.cpp b/code/ryzom/client/src/interface_v3/action_handler_item.cpp index f6dec2d1f..79e0999e7 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_item.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_item.cpp @@ -329,7 +329,7 @@ void CInterfaceItemEdition::CItemEditionWindow::end() // remove infos waiter (if not already canceled) getInventory().removeItemInfoWaiter(this); _CurrItemSheet = NULL; - WindowName = ""; + WindowName.clear(); // hide the dialog CInterfaceManager *pIM = CInterfaceManager::getInstance(); diff --git a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp index 88b01a8e9..47248ee2a 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp @@ -928,7 +928,7 @@ bool CStringPostProcessRemoveName::cbIDStringReceived(ucstring &inOut) } } else - inOut = ""; + inOut.clear(); return true; } diff --git a/code/ryzom/client/src/interface_v3/character_3d.cpp b/code/ryzom/client/src/interface_v3/character_3d.cpp index f9d4e36c2..c01760115 100644 --- a/code/ryzom/client/src/interface_v3/character_3d.cpp +++ b/code/ryzom/client/src/interface_v3/character_3d.cpp @@ -62,8 +62,8 @@ SCharacter3DSetup::SCharacter3DSetup () Parts[Char3DPart_Face].Name = "TR_HOM_visage.shape"; Parts[Char3DPart_Head].Name = "FY_HOM_cheveux_medium01.shape"; Parts[Char3DPart_Hands].Name = "TR_HOM_underwear_hand.shape"; - Parts[Char3DPart_HandRightItem].Name = ""; - Parts[Char3DPart_HandLeftItem].Name = ""; + Parts[Char3DPart_HandRightItem].Name.clear(); + Parts[Char3DPart_HandLeftItem].Name.clear(); for (uint32 i = 0; i < NB_CHARACTER3D_PARTS; ++i) { Parts[i].Color = 0; @@ -609,11 +609,11 @@ CCharacter3D::CCharacter3D() _PlayList = NULL; _FacePlayList = NULL; // Clear the cache to make it work with 1st init - _CurrentSetup.Skeleton = ""; + _CurrentSetup.Skeleton.clear(); _CurrentSetup.AnimPlayed = -1; for (uint32 i = 0; i < NB_CHARACTER3D_PARTS; ++i) { - _CurrentSetup.Parts[i].Name = ""; + _CurrentSetup.Parts[i].Name.clear(); _CurrentSetup.Parts[i].Color = -1; _CurrentSetup.Parts[i].Quality = -1; } diff --git a/code/ryzom/client/src/interface_v3/chat_displayer.h b/code/ryzom/client/src/interface_v3/chat_displayer.h index 5c46c81ca..9d09e4c38 100644 --- a/code/ryzom/client/src/interface_v3/chat_displayer.h +++ b/code/ryzom/client/src/interface_v3/chat_displayer.h @@ -69,7 +69,7 @@ public: } else { - str = ""; + str.clear(); mode = CInterfaceManager::InfoMsg; } diff --git a/code/ryzom/client/src/interface_v3/group_html_cs.cpp b/code/ryzom/client/src/interface_v3/group_html_cs.cpp index ef72eaae6..66ac1006e 100644 --- a/code/ryzom/client/src/interface_v3/group_html_cs.cpp +++ b/code/ryzom/client/src/interface_v3/group_html_cs.cpp @@ -39,7 +39,7 @@ NLMISC_REGISTER_OBJECT(CViewBase, CGroupHTMLCS, std::string, "cs_html"); CGroupHTMLCS::CGroupHTMLCS(const TCtorParam ¶m) : CGroupHTML(param) { - Home = ""; + Home.clear(); } // *************************************************************************** diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 64c81df66..cbcbf4690 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -774,7 +774,7 @@ bool CGroupMap::parse(xmlNodePtr cur, CInterfaceGroup * parentGroup) { SMap island; island.Name = completeIslands[k].Island; - island.ContinentName = ""; // no access to world map for now ... + island.ContinentName.clear(); // no access to world map for now ... island.MinX = (float) completeIslands[k].XMin; island.MinY = (float) completeIslands[k].YMin; island.MaxX = (float) completeIslands[k].XMax; diff --git a/code/ryzom/client/src/interface_v3/guild_manager.cpp b/code/ryzom/client/src/interface_v3/guild_manager.cpp index a22c8dbc5..1867ea927 100644 --- a/code/ryzom/client/src/interface_v3/guild_manager.cpp +++ b/code/ryzom/client/src/interface_v3/guild_manager.cpp @@ -278,7 +278,7 @@ void CGuildManager::update() // Guild stuff uint32 oldName = _Guild.NameID; _Guild.NameID = NLGUI::CDBManager::getInstance()->getDbProp("SERVER:GUILD:NAME")->getValue32(); - _Guild.Name = ""; + _Guild.Name.clear(); _InGuild = (_Guild.NameID != 0); if (!_InGuild) closeAllInterfaces(); diff --git a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp index bb15d8d4b..6d3d7d5fe 100644 --- a/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp +++ b/code/ryzom/client/src/interface_v3/interface_3d_scene.cpp @@ -792,7 +792,7 @@ bool CInterface3DCharacter::parse (xmlNodePtr cur, CInterfaceGroup *parentGroup) return false; CXMLAutoPtr ptr((const char*)xmlGetProp (cur, (xmlChar*)"dblink")); - _DBLink = ""; + _DBLink.clear(); if (ptr) _DBLink = (const char *)ptr; CVector pos(0,0,0), rot(0,0,0); diff --git a/code/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp b/code/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp index 61fe71958..5fe4cc569 100644 --- a/code/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp +++ b/code/ryzom/client/src/interface_v3/interface_expr_user_fct_game.cpp @@ -1148,7 +1148,7 @@ static DECLARE_INTERFACE_USER_FCT(getOutpostBuildingDesc) if (pOBS && pOBS->OBType == COutpostBuildingSheet::OB_Empty) { // Don't display description if the building is an empty slot - name = ""; + name.clear(); } else { diff --git a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp index 1fef759ea..9e7c42888 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp @@ -451,8 +451,8 @@ void CModalContainerEditCmd::setTitle(const std::string &uistr) void CModalContainerEditCmd::activate() { CMacroCmdManager *pMCM = CMacroCmdManager::getInstance(); - CurrentEditCmdLine.ActionName.Name = ""; - CurrentEditCmdLine.ActionName.Argu = ""; + CurrentEditCmdLine.ActionName.Name.clear(); + CurrentEditCmdLine.ActionName.Argu.clear(); CurrentEditCmdNb = -1; Win->setActive(true); Win->launch(); @@ -618,7 +618,7 @@ void CModalContainerEditCmd::activateFrom (const std::string &cmdName, const std (((noParam == nbRealParam-1) && (rP.Type != CBaseAction::CParameter::Hidden)) && (i == (pBA->Parameters.size()-1)))) { sTmp = curStr; - curStr = ""; + curStr.clear(); } else { @@ -807,7 +807,7 @@ void CModalContainerEditCmd::validCurrentCommand() // Build couple (name,param) that define a command CurrentEditCmdLine.ActionName.Name = rBA.Name; - CurrentEditCmdLine.ActionName.Argu = ""; + CurrentEditCmdLine.ActionName.Argu.clear(); uint noParam = 0; for (uint i = 0; i < rBA.Parameters.size(); ++i) { diff --git a/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp b/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp index 5fc2872dd..8d4ccb4c5 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp @@ -365,7 +365,6 @@ void CMacroCmdManager::addActionManagerEntries() CBaseAction::CParameter p; p.Type = CBaseAction::CParameter::Constant; - p.Name = ""; p.LocalizedName = "uiMacroName"; uint i; diff --git a/code/ryzom/client/src/interface_v3/people_interraction.cpp b/code/ryzom/client/src/interface_v3/people_interraction.cpp index 71cb5f7ec..75a29cba7 100644 --- a/code/ryzom/client/src/interface_v3/people_interraction.cpp +++ b/code/ryzom/client/src/interface_v3/people_interraction.cpp @@ -532,7 +532,7 @@ void CPeopleInterraction::createTeamList() // NB: use an intermediate temp var, to avoid show of the window each time a new team member enters string sExpr = "@UI:VARIABLES:IS_TEAM_PRESENT"; string sAction = "set"; - string sCond = ""; + string sCond; string sParams = "target_property=ui:interface:team_list:active|value=@UI:VARIABLES:IS_TEAM_PRESENT"; if (TeamChat) @@ -794,7 +794,6 @@ void CPeopleInterraction::createTheUserChat() chatDesc.Id = "user_chat"; chatDesc.ChatTemplate = "filtered_chat_id"; chatDesc.AHOnActive = "user_chat_active"; - chatDesc.AHOnActiveParams = ""; chatDesc.AHOnCloseButton = "set"; chatDesc.AHOnCloseButtonParams = "dblink=UI:SAVE:ISDETACHED:USER_CHAT|value=0"; @@ -845,7 +844,7 @@ void CPeopleInterraction::createChatGroup() CChatWindowDesc chatDesc; chatDesc.FatherContainer = "ui:interface"; chatDesc.Listener = NULL; - chatDesc.Title= ""; // NB: the chatgroup is the only one that can be not named (because of uniqueness title test) + chatDesc.Title.clear(); // NB: the chatgroup is the only one that can be not named (because of uniqueness title test) chatDesc.Localize = true; chatDesc.Savable = true; chatDesc.ChatTemplate = "main_chat_group"; diff --git a/code/ryzom/client/src/interface_v3/people_list.cpp b/code/ryzom/client/src/interface_v3/people_list.cpp index 3433d1154..6d6355421 100644 --- a/code/ryzom/client/src/interface_v3/people_list.cpp +++ b/code/ryzom/client/src/interface_v3/people_list.cpp @@ -133,7 +133,7 @@ bool CPeopleList::create(const CPeopleListDesc &desc, const CChatWindowDesc *cha if (chat) { CChatWindowDesc chatDesc = *chat; - chatDesc.FatherContainer = ""; + chatDesc.FatherContainer.clear(); _ChatWindow = getChatWndMgr().createChatWindow(chatDesc); if (!_ChatWindow) { diff --git a/code/ryzom/client/src/login_progress_post_thread.cpp b/code/ryzom/client/src/login_progress_post_thread.cpp index 788877980..08503f875 100644 --- a/code/ryzom/client/src/login_progress_post_thread.cpp +++ b/code/ryzom/client/src/login_progress_post_thread.cpp @@ -99,7 +99,7 @@ static uint64 getVideoDriverVersion() { static std::string ret; uint64 version=0; - ret = ""; + ret.clear(); bool ok = CSystemInfo::getVideoInfo(ret, version); if (ok) { diff --git a/code/ryzom/client/src/login_xdelta.cpp b/code/ryzom/client/src/login_xdelta.cpp index 5cb1ddc7d..e6b4bde28 100644 --- a/code/ryzom/client/src/login_xdelta.cpp +++ b/code/ryzom/client/src/login_xdelta.cpp @@ -246,7 +246,7 @@ bool CXDPFileReader::readBool(bool &val) bool CXDPFileReader::readString(std::string &s) { uint32 nLen; - s = ""; + s.clear(); if (!readUInt(nLen)) return false; for (uint32 i = 0; i < nLen; ++i) { @@ -452,8 +452,8 @@ bool CXDeltaPatch::load(const string &sFilename) uint32 nFromNameLen = vHeader[1] >> 16; uint32 nToNameLen = vHeader[1] & 0xffff; - _FromName = ""; - _ToName = ""; + _FromName.clear(); + _ToName.clear(); for (i = 0; i < nFromNameLen; ++i) { @@ -738,7 +738,7 @@ CXDeltaPatch::TApplyResult CXDeltaPatch::apply(const std::string &sFileToPatch, */ return ApplyResult_Error; } - errorMsg = ""; + errorMsg.clear(); return ApplyResult_Ok; } diff --git a/code/ryzom/client/src/misc.cpp b/code/ryzom/client/src/misc.cpp index bb3625c4b..18fa2a754 100644 --- a/code/ryzom/client/src/misc.cpp +++ b/code/ryzom/client/src/misc.cpp @@ -298,7 +298,7 @@ bool mode2Anim(MBEHAV::EMode mode, string &result) // No animset for the mode. else { - mode2AnimArray[i] = ""; + mode2AnimArray[i].clear(); nlwarning("mode2Anim: no animset associated to the mode %d'%s'.", i, modeName.c_str()); } } diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index b949263e7..42285a167 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -290,7 +290,7 @@ static void readPrivileges(NLMISC::CBitMemStream &impulse) catch(const EStreamOverflow &) { nlwarning("User privileges not serialised, assuming none"); - UserPrivileges = ""; + UserPrivileges.clear(); } } @@ -850,7 +850,7 @@ void CInterfaceChatDisplayer::displayChat(TDataSetIndex compressedSenderIndex, c } } } - finalString = ""; + finalString.clear(); } else { @@ -1049,7 +1049,7 @@ string getInterfaceNameFromId (sint botType, sint interfaceId) case BOTCHATTYPE::NeutralMainPage: interfaceName += "neutral_main"; break; case BOTCHATTYPE::NastyMainPage: interfaceName += "nasty_main"; break; case BOTCHATTYPE::MoreNewsPage: interfaceName += "more_news"; break; - case BOTCHATTYPE::Done: nlinfo ("end of bot chat"); interfaceName = ""; break; + case BOTCHATTYPE::Done: nlinfo ("end of bot chat"); interfaceName.clear(); break; } return interfaceName; } @@ -3285,7 +3285,7 @@ private: } else { - contentStr = ""; + contentStr.clear(); i = digitStart; } } diff --git a/code/ryzom/client/src/player_cl.cpp b/code/ryzom/client/src/player_cl.cpp index a086855ab..bfcb30f0e 100644 --- a/code/ryzom/client/src/player_cl.cpp +++ b/code/ryzom/client/src/player_cl.cpp @@ -733,8 +733,12 @@ void CPlayerCL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle * // Invalidate instances cache for (uint i = 0; i < _Instances.size(); ++i) - _Instances[i].CurrentName = _Instances[i].LoadingName = ""; - _Face.CurrentName = _Face.LoadingName = ""; + { + _Instances[i].CurrentName.clear(); + _Instances[i].LoadingName.clear(); + } + _Face.CurrentName.clear(); + _Face.LoadingName.clear(); } // Check the skeleton. if(skeleton() && !ClientCfg.Light) @@ -859,11 +863,11 @@ void CPlayerCL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle * if (!_Face.Loading.empty()) Scene->deleteInstance(_Face.Loading); _Face.Loading = NULL; - _Face.LoadingName = ""; + _Face.LoadingName.clear(); if (!_Face.Current.empty()) Scene->deleteInstance(_Face.Current); _Face.Current = NULL; - _Face.CurrentName = ""; + _Face.CurrentName.clear(); } // Now we have a skeleton, we can update VpB and VpC. sint64 vB, vC; diff --git a/code/ryzom/client/src/player_r2_cl.cpp b/code/ryzom/client/src/player_r2_cl.cpp index b4269dd54..e587e4baa 100644 --- a/code/ryzom/client/src/player_r2_cl.cpp +++ b/code/ryzom/client/src/player_r2_cl.cpp @@ -474,8 +474,13 @@ void CPlayerR2CL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle // Invalidate instances cache for (uint i = 0; i < _Instances.size(); ++i) - _Instances[i].CurrentName = _Instances[i].LoadingName = ""; - _Face.CurrentName = _Face.LoadingName = ""; + { + _Instances[i].CurrentName.clear(); + _Instances[i].LoadingName.clear(); + } + + _Face.CurrentName.clear(); + _Face.LoadingName.clear(); } // Check the skeleton. if(skeleton() && !ClientCfg.Light) @@ -614,11 +619,11 @@ void CPlayerR2CL::updateVisualPropertyVpa(const NLMISC::TGameCycle &/* gameCycle if (!_Face.Loading.empty()) Scene->deleteInstance(_Face.Loading); _Face.Loading = NULL; - _Face.LoadingName = ""; + _Face.LoadingName.clear(); if (!_Face.Current.empty()) Scene->deleteInstance(_Face.Current); _Face.Current = NULL; - _Face.CurrentName = ""; + _Face.CurrentName.clear(); } // Now we have a skeleton, we can update VpB and VpC. sint64 vB, vC; diff --git a/code/ryzom/client/src/r2/dmc/action_historic.cpp b/code/ryzom/client/src/r2/dmc/action_historic.cpp index d4504d3d8..4ad984778 100644 --- a/code/ryzom/client/src/r2/dmc/action_historic.cpp +++ b/code/ryzom/client/src/r2/dmc/action_historic.cpp @@ -70,7 +70,7 @@ void CActionHistoric::cancelAction() _NewAction = NULL; _NewActionIsPending = false; _SubActionCount = 1; - _NewActionName = ""; + _NewActionName.clear(); getEditor().callEnvMethod("onCancelActionInHistoric", 0, 0); } diff --git a/code/ryzom/client/src/r2/dmc/property_accessor.cpp b/code/ryzom/client/src/r2/dmc/property_accessor.cpp index 2db78ad14..a7037201a 100644 --- a/code/ryzom/client/src/r2/dmc/property_accessor.cpp +++ b/code/ryzom/client/src/r2/dmc/property_accessor.cpp @@ -141,7 +141,7 @@ const CObject *CPropertyAccessor::getPropertyValue(const CObject* componentParam } else { - str =""; + str.clear(); } } diff --git a/code/ryzom/client/src/r2/editor.cpp b/code/ryzom/client/src/r2/editor.cpp index 8e7e13597..f9c047fd5 100644 --- a/code/ryzom/client/src/r2/editor.cpp +++ b/code/ryzom/client/src/r2/editor.cpp @@ -168,7 +168,7 @@ bool ReloadUIFlag = true; // by default, CEditor loads its own UI bool ResetScenarioWanted = false; bool ReloadScenarioWanted = false; bool ConnectionWanted = false; -std::string CEditor::_ScenarioToLoadWhenEntreringIntoAnimation=""; +std::string CEditor::_ScenarioToLoadWhenEntreringIntoAnimation; bool CEditor::_IsStartingScenario=false; // ********************************************************************************************************* diff --git a/code/ryzom/client/src/r2/tool_pick.cpp b/code/ryzom/client/src/r2/tool_pick.cpp index a34d3ccdf..835fcd8ea 100644 --- a/code/ryzom/client/src/r2/tool_pick.cpp +++ b/code/ryzom/client/src/r2/tool_pick.cpp @@ -73,7 +73,7 @@ void CToolPick::setIgnoreInstances(const std::string & ignoreInstances) while(!tmp.empty() && tmp[tmp.size()]==' ') { if(tmp.size()==1) - tmp=""; + tmp.clear(); else tmp = tmp.substr(0,tmp.size()-1); } diff --git a/code/ryzom/client/src/rosace.cpp b/code/ryzom/client/src/rosace.cpp index 71e41929b..75b896255 100644 --- a/code/ryzom/client/src/rosace.cpp +++ b/code/ryzom/client/src/rosace.cpp @@ -493,7 +493,7 @@ CRosace::~CRosace() void CRosace::init() { _Mode = CRosacePage::CursorAngleMode; - _Selected = ""; + _Selected.clear(); }// init // //----------------------------------------------- diff --git a/code/ryzom/common/src/game_share/dms.cpp b/code/ryzom/common/src/game_share/dms.cpp index c74c1ef6d..8f8af5b51 100644 --- a/code/ryzom/common/src/game_share/dms.cpp +++ b/code/ryzom/common/src/game_share/dms.cpp @@ -200,7 +200,7 @@ namespace R2 clientEid.setType(RYZOMID::player); userPriv =":DEV:"; - extendedPriv = ""; + extendedPriv.clear(); return true; } diff --git a/code/ryzom/common/src/game_share/mainland_summary.h b/code/ryzom/common/src/game_share/mainland_summary.h index 24bba104c..a6ed6a9ca 100644 --- a/code/ryzom/common/src/game_share/mainland_summary.h +++ b/code/ryzom/common/src/game_share/mainland_summary.h @@ -33,8 +33,6 @@ struct CMainlandSummary { CMainlandSummary(): Id(0) { - Name = ""; - Description = ""; LanguageCode = "en"; Online = false; } diff --git a/code/ryzom/common/src/game_share/mirrored_data_set.cpp b/code/ryzom/common/src/game_share/mirrored_data_set.cpp index 69884afee..b30df0f1c 100644 --- a/code/ryzom/common/src/game_share/mirrored_data_set.cpp +++ b/code/ryzom/common/src/game_share/mirrored_data_set.cpp @@ -1418,7 +1418,7 @@ void storeDatasetPtToQuickArray( uint16 bitIndex, CMirroredDataSet *dataSet ) const char *getBlankChars( const string& leftstr ) { static string blank; - blank = ""; + blank.clear(); for ( sint i=0; i!=max((sint32)(19-leftstr.size()),(sint32)0)+1; ++i ) { blank += " "; diff --git a/code/ryzom/common/src/game_share/msg_client_server.h b/code/ryzom/common/src/game_share/msg_client_server.h index cf521a02d..08dc0e171 100644 --- a/code/ryzom/common/src/game_share/msg_client_server.h +++ b/code/ryzom/common/src/game_share/msg_client_server.h @@ -677,7 +677,6 @@ public: SenderNameId = 0; ChatMode = 0; PhraseId = 0; - CustomTxt = ""; } void serial(NLMISC::CBitMemStream &f) diff --git a/code/ryzom/common/src/game_share/object.cpp b/code/ryzom/common/src/game_share/object.cpp index dddb6b270..f914085e4 100644 --- a/code/ryzom/common/src/game_share/object.cpp +++ b/code/ryzom/common/src/game_share/object.cpp @@ -520,7 +520,7 @@ bool CObject::getShortestName(std::string &instanceId, std::string &attrName, si if (isTable() && getAttr("InstanceId")) { instanceId = getAttr("InstanceId")->toString(); - attrName = ""; + attrName.clear(); position = -1; return true; } diff --git a/code/ryzom/common/src/game_share/ring_access.cpp b/code/ryzom/common/src/game_share/ring_access.cpp index c191f8c83..9e0ba8ce4 100644 --- a/code/ryzom/common/src/game_share/ring_access.cpp +++ b/code/ryzom/common/src/game_share/ring_access.cpp @@ -349,7 +349,7 @@ std::string CRingAccess::upgradeRingAccess(const std::string& defaultValue, cons } // return the new value as string - std::string toRet =""; + std::string toRet; { std::map::const_iterator first(defaultMap.begin()), last(defaultMap.end()); diff --git a/code/ryzom/common/src/game_share/scenario.cpp b/code/ryzom/common/src/game_share/scenario.cpp index 120b422d2..e2437eac2 100644 --- a/code/ryzom/common/src/game_share/scenario.cpp +++ b/code/ryzom/common/src/game_share/scenario.cpp @@ -853,8 +853,8 @@ bool CScenarioValidator::setScenarioToLoad( const std::string& filename, CScenar // Scenario without header if (_ScenarioBody.size() < headerLen ||_ScenarioBody.substr(0, headerLen) != header ) { - md5 = ""; - signature = ""; + md5.clear(); + signature.clear(); inf.close(); return true; } @@ -1108,8 +1108,8 @@ bool CUserComponentValidator::setUserComponentToLoad( const std::string& filenam // Scenario without header if (_UserComponentBody.size() < headerLen ||_UserComponentBody.substr(0, headerLen) != header ) { - md5 = ""; - signature = ""; + md5.clear(); + signature.clear(); inf.close(); return true; } diff --git a/code/ryzom/common/src/game_share/server_animation_module.cpp b/code/ryzom/common/src/game_share/server_animation_module.cpp index 199a983ef..fbeb5516f 100644 --- a/code/ryzom/common/src/game_share/server_animation_module.cpp +++ b/code/ryzom/common/src/game_share/server_animation_module.cpp @@ -543,7 +543,7 @@ void CAnimationSession::updateActPositionDescriptions(TActPositionDescriptions& { actPositionDescription.Name = act->Name; actPositionDescription.Season = 0; - actPositionDescription.Island = ""; + actPositionDescription.Island.clear(); actPositionDescription.LocationId = 0; } actPositionDescriptions.push_back(actPositionDescription); diff --git a/code/ryzom/common/src/game_share/server_edition_module.cpp b/code/ryzom/common/src/game_share/server_edition_module.cpp index 924f23497..1ab30148c 100644 --- a/code/ryzom/common/src/game_share/server_edition_module.cpp +++ b/code/ryzom/common/src/game_share/server_edition_module.cpp @@ -486,7 +486,7 @@ using namespace R2; //----------------- -------------------------------------------- void CKeysHolder::resetPolicies() { - _CurrentKey = ""; + _CurrentKey.clear(); _Keys.clear(); } @@ -2128,7 +2128,7 @@ void CServerEditionModule::onScenarioUploadAsked(NLNET::IModuleProxy *senderModu TSessionId sessionId = found->second; scenario->setHighLevel( scenarioHl ); - getSession(sessionId)->RingAccess = ""; + getSession(sessionId)->RingAccess.clear(); scenario->setInitialActIndex(1); if (mustBroadCast) { @@ -2819,7 +2819,7 @@ void CServerEditionModule::createSession(NLNET::IModuleProxy *sender, TCharId ow info.setSessionAnimatorCharId( ownerCharId); if ( !nevraxScenario ) { - missionTag = ""; + missionTag.clear(); trialAllowed = false; } @@ -2976,11 +2976,11 @@ void CServerEditionModule::resetSession(NLNET::IModuleProxy *sender, TSessionId return; } - session->RingAccess = ""; + session->RingAccess.clear(); if (!reconnect) // reset { scenario->setHighLevel( 0 ); - getSession(sessionId)->RingAccess = ""; + getSession(sessionId)->RingAccess.clear(); scenario->setMode(0); @@ -3869,7 +3869,7 @@ void CServerEditionModule::startScenario(NLNET::IModuleProxy *senderModuleProxy, info.setSessionAnimatorCharId( charId); if ( !nevraxScenario ) { - missionTag = ""; + missionTag.clear(); trialAllowed = false; } @@ -5581,7 +5581,7 @@ const NLNET::TModuleProxyPtr * CServerEditionModule::getClientProxyPtr(TCharId c void CServerEditionModule::getTpContext(TCharId charId, std::string& tpCancelTextId, R2::TTeleportContext& tpContext) { - tpCancelTextId = ""; + tpCancelTextId.clear(); tpContext = R2::TPContext_Unknown; TSessionId sessionId = getSessionIdByCharId(charId); @@ -5967,13 +5967,13 @@ void CServerEditionModule::addKeyPolicy(NLNET::IModuleProxy *sender, const std:: std::string key = keyName; if (key == "EMPTY") { - key = ""; + key.clear(); } std::string privateKey = privateKeyValue; if (privateKey == "EMPTY") { - privateKey = ""; + privateKey.clear(); } _KeysHolder->addKeyPolicy(key, privateKey, p); diff --git a/code/ryzom/common/src/game_share/string_mgr_module.cpp b/code/ryzom/common/src/game_share/string_mgr_module.cpp index df74f35d1..6e29e66f6 100644 --- a/code/ryzom/common/src/game_share/string_mgr_module.cpp +++ b/code/ryzom/common/src/game_share/string_mgr_module.cpp @@ -449,7 +449,7 @@ void CStringManagerModule::unregisterTableRequested(TSessionId sessionId) static std::string formatString(std::string str,std::vector args) { uint32 size = (uint32)args.size(); - std::string ret=""; + std::string ret; { std::string::size_type pos = 0; CSString cstring(str); diff --git a/code/ryzom/tools/leveldesign/alias_synchronizer/alias_synchronizer.cpp b/code/ryzom/tools/leveldesign/alias_synchronizer/alias_synchronizer.cpp index 5bfd98eae..4c6d2ffa3 100644 --- a/code/ryzom/tools/leveldesign/alias_synchronizer/alias_synchronizer.cpp +++ b/code/ryzom/tools/leveldesign/alias_synchronizer/alias_synchronizer.cpp @@ -302,7 +302,7 @@ struct TSetLastFolder if (!folders.empty()) str = folders.back(); else - str = ""; + str.clear(); } }; diff --git a/code/ryzom/tools/leveldesign/csv_transform/csv_transform.cpp b/code/ryzom/tools/leveldesign/csv_transform/csv_transform.cpp index 941db4100..409f8ecbc 100644 --- a/code/ryzom/tools/leveldesign/csv_transform/csv_transform.cpp +++ b/code/ryzom/tools/leveldesign/csv_transform/csv_transform.cpp @@ -314,21 +314,21 @@ private: mode=PARA; closeFooters(); paraName=rest; - paras[paraName] = ""; + paras[paraName].clear(); } else if (keyword=="header") { mode=HEADER; closeFooters(); paraName=rest; - headers[paraName] = ""; + headers[paraName].clear(); } else if (keyword=="footer") { mode=FOOTER; closeFooters(); paraName=rest; - footers[paraName] = ""; + footers[paraName].clear(); } else if (keyword=="file_header") { diff --git a/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.cpp index 1acd105fd..38ed1ec9c 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/dfn_dialog.cpp @@ -378,9 +378,9 @@ void CDfnEditListCtrl::getNewItemText (uint item, uint subItem, std::string &ret else if (subItem == 2) ret = theApp.DefaultType; else if (subItem == 3) - ret = ""; + ret.clear(); else if (subItem == 4) - ret = ""; + ret.clear(); } // *************************************************************************** diff --git a/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.h b/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.h index 4dc4d1ddf..59dd044f8 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.h +++ b/code/ryzom/tools/leveldesign/georges_dll/edit_list_ctrl.h @@ -86,9 +86,9 @@ public: virtual TItemEdit getItemEditMode (uint item, uint subItem) {return EditFixedCombo;} virtual void getComboBoxStrings (uint item, uint subItem, std::vector &retStrings); - virtual void getMemComboBoxProp (uint item, uint subItem, std::string ®Adr, bool &browse) { regAdr = ""; browse = false; } + virtual void getMemComboBoxProp (uint item, uint subItem, std::string ®Adr, bool &browse) { regAdr.clear(); browse = false; } virtual void getNewItemText (uint item, uint subItem, std::string &ret) { ret = "new"; } - virtual void getBrowseInfo (uint item, uint subItem, std::string &defExt, std::string &defFilename, std::string &defDir, std::string &filter) { defExt=""; defFilename=""; filter=""; defDir="";} + virtual void getBrowseInfo (uint item, uint subItem, std::string &defExt, std::string &defFilename, std::string &defDir, std::string &filter) { defExt.clear(); defFilename.clear(); filter.clear(); defDir.clear();} virtual void onItemChanged (uint item, uint subItem) {} void memComboBoxAsChange (bool selChange); diff --git a/code/ryzom/tools/leveldesign/georges_dll/form_dialog.cpp b/code/ryzom/tools/leveldesign/georges_dll/form_dialog.cpp index 4657ee369..60a555797 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/form_dialog.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/form_dialog.cpp @@ -1178,7 +1178,7 @@ void CFormDialog::getDfnName (string &result) const result = (*extension == '.') ? extension+1 : extension; } else - result = ""; + result.clear(); } // *************************************************************************** @@ -2346,7 +2346,7 @@ void CColorEdit::getValue (std::string &result) } else { - result = ""; + result.clear(); } } @@ -2803,7 +2803,7 @@ void CIconWidget::onOk () void CIconWidget::getValue (std::string &result) { - result = ""; + result.clear(); } // *************************************************************************** diff --git a/code/ryzom/tools/leveldesign/georges_dll/icon_wnd.cpp b/code/ryzom/tools/leveldesign/georges_dll/icon_wnd.cpp index de9dcaad7..5a28d65e6 100644 --- a/code/ryzom/tools/leveldesign/georges_dll/icon_wnd.cpp +++ b/code/ryzom/tools/leveldesign/georges_dll/icon_wnd.cpp @@ -28,7 +28,7 @@ using namespace NLMISC; using namespace std; -string CIconWnd::IconPath = ""; +string CIconWnd::IconPath; CIconWnd::CIconWnd() diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageSimple.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageSimple.cpp index decd2baca..2b0e9e351 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/PageSimple.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/PageSimple.cpp @@ -103,9 +103,9 @@ void CPageSimple::onDocChanged() if (!valid) { // This is not a valid simple sound... - _AudioFormat = ""; - _Filename = ""; - _Filesize = ""; + _AudioFormat.Empty(); + _Filename.Empty(); + _Filesize.Empty(); UpdateData(FALSE); } } diff --git a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp index 5ef070cfe..e7c6b844c 100644 --- a/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp +++ b/code/ryzom/tools/leveldesign/georges_plugin_sound/sound_plugin.cpp @@ -86,7 +86,7 @@ CSoundPlugin::CSoundPlugin(IEdit *globalInterface) CLoadingDialog loadDlg; loadDlg.Create(IDD_DIALOG_LOADING); - loadDlg.Message = ""; + loadDlg.Message.Empty(); loadDlg.UpdateData(FALSE); loadDlg.ShowWindow(SW_SHOW); diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/main.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/main.cpp index 1c596e837..b4bb6d77c 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/main.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/main.cpp @@ -105,7 +105,7 @@ int main(int argc, char *argv[]) ::fclose(fp); // TODO: set diff program in .cfg - std::string compareApp = ""; + std::string compareApp; std::string command = NLMISC::toString("%s %s/compiled_mission.script test_compilateur.script", compareApp.c_str(), tmp); sint error = system(command.c_str()); diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.cpp index 09d9fc723..39354138d 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.cpp @@ -278,7 +278,7 @@ bool GenderExtractor::parseMarkup(const std::string& literal, const std::string bool changed = false; std::string oldPhrase = literal; - newPhrase = ""; + newPhrase.clear(); do { std::string before; diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h index bae7f8142..46e0cc575 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/mission_compiler.h @@ -54,12 +54,12 @@ inline void untagVar(std::string &var) if (!var.empty()) { if (var[0] != '$') - var = ""; + var.clear(); else { var = var.substr(1); if (var[var.size()-1] != '$') - var = ""; + var.clear(); else var = var.substr(0, var.size()-1); } diff --git a/code/ryzom/tools/leveldesign/mp_generator/main.cpp b/code/ryzom/tools/leveldesign/mp_generator/main.cpp index eed001ac7..15740d477 100644 --- a/code/ryzom/tools/leveldesign/mp_generator/main.cpp +++ b/code/ryzom/tools/leveldesign/mp_generator/main.cpp @@ -206,7 +206,7 @@ void InitCreatureMP() { code = ligneN.firstWord(); nom = ligneM.firstWord(); - ligneN = ""; + ligneN.clear(); } // save items to generate for each new creature name found @@ -1166,7 +1166,7 @@ void NewMP( CSString& ligne ) special = ligne; if ( !special.firstWord().empty() ) specialNames.insert( special ); - ligne = ""; + ligne.clear(); } else { diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/action.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/action.cpp index d597888c6..b288f9f0c 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/action.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/action.cpp @@ -191,13 +191,13 @@ bool CActionLigoResize::redo () // By default data.PosX = 0; data.PosY = 0; - data.ZoneName = ""; + data.ZoneName.clear(); data.Rot = 0; data.Flip = 0; - data.SharingMatNames[0] = ""; - data.SharingMatNames[1] = ""; - data.SharingMatNames[2] = ""; - data.SharingMatNames[3] = ""; + data.SharingMatNames[0].clear(); + data.SharingMatNames[1].clear(); + data.SharingMatNames[2].clear(); + data.SharingMatNames[3].clear(); data.SharingCutEdges[0] = 0; data.SharingCutEdges[1] = 0; data.SharingCutEdges[2] = 0; diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/builder_zone.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/builder_zone.cpp index 1e9c1ed3e..ffdfe4d60 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/builder_zone.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/builder_zone.cpp @@ -428,10 +428,10 @@ void CBuilderZone::calcMask() CBuilderZone::CBuilderZone (uint bitmapSize) : _DataBase (bitmapSize) { // Set Current Filter - _FilterType1 = STRING_UNUSED; _FilterValue1 = ""; - _FilterType2 = STRING_UNUSED; _FilterValue2 = ""; - _FilterType3 = STRING_UNUSED; _FilterValue3 = ""; - _FilterType4 = STRING_UNUSED; _FilterValue4 = ""; + _FilterType1 = STRING_UNUSED; + _FilterType2 = STRING_UNUSED; + _FilterType3 = STRING_UNUSED; + _FilterType4 = STRING_UNUSED; _FilterOperator2 = 0; _FilterOperator3 = 0; _FilterOperator4 = 0; @@ -450,7 +450,6 @@ CBuilderZone::CBuilderZone (uint bitmapSize) : _DataBase (bitmapSize) _ApplyCycleSelection = 0; _NotPropagate = false; _Force = false; - _LastPathName = ""; _ToolsZone = NULL; } @@ -1647,7 +1646,7 @@ string CBuilderZone::getZoneName (sint32 x, sint32 y) return sRet; } } - sRet = ""; + sRet.clear(); return sRet; } diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/dialog_properties.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/dialog_properties.cpp index e39994fc4..8fa0266e7 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/dialog_properties.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/dialog_properties.cpp @@ -1121,7 +1121,7 @@ bool CDialogProperties::CWidget::toParameter (const CDatabaseLocatorPointer &loc // Get the value string value; /* todo hulud remove if (Default) - value = ""; + value.clear(); else*/ getValue (value); @@ -1150,7 +1150,7 @@ void CDialogProperties::CWidget::getValue (std::string &result) const else if (CheckBox.GetCheck() == 0) result = "false"; else - result = ""; + result.clear(); } else if (Parameter.Type == CPrimitiveClass::CParameter::ConstString) { @@ -1192,7 +1192,7 @@ void CDialogProperties::CWidget::getValue (std::vector &result) con if (*strP == '\n') { result.push_back (dst); - dst = ""; + dst.clear(); } else if (*strP != '\r') { @@ -1390,10 +1390,10 @@ void CDialogProperties::CWidget::getFilename (string &result) { CString cstr; ListEditBox.GetText (sel, cstr); - result = (const char*)cstr; + result = tStrToUtf8(cstr); } else - result = ""; + result.clear(); } else { @@ -1659,7 +1659,7 @@ BOOL CDialogProperties::OnCommand(WPARAM wParam, LPARAM lParam) std::vector result; widget->getValue (result); uint i; - string text = ""; + string text; for (i=0; iMultipleValues = false; string fromWhere; @@ -3225,7 +3225,7 @@ void CDialogProperties::setDefaultValue (CWidget *widget, string &value) } if (widget->FromWhere != fromWhere) { - widget->FromWhere = ""; + widget->FromWhere.clear(); } } else @@ -3287,7 +3287,7 @@ void CDialogProperties::setDefaultValue (CWidget *widget, std::vectorFromWhere != fromWhere) { - widget->FromWhere = ""; + widget->FromWhere.clear(); } } else @@ -3483,7 +3483,7 @@ BOOL CMyComboBox::PreTranslateMessage( MSG* pMsg ) // Erase key buffer ? sint64 time = NLMISC::CTime::getLocalTime (); if (time - _LastStrokeTime > COMBO_STROKE_DELAI) - _LastString = ""; + _LastString.clear(); // Add this char _LastString.push_back (tolower((TCHAR) pMsg->wParam)); diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/find_primitive_dlg.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/find_primitive_dlg.cpp index c15fbf4b9..87e5d553c 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/find_primitive_dlg.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/find_primitive_dlg.cpp @@ -179,7 +179,7 @@ void CFindPrimitiveDlg::OnFindNext() // Init locator _Locator.getRoot (0); - PrimitiveName = ""; + PrimitiveName.Empty(); } UpdateData (FALSE); } diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/main_frm.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/main_frm.cpp index f1fd029c0..24096f690 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/main_frm.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/main_frm.cpp @@ -812,7 +812,7 @@ void CMainFrame::displayStatusBarInfo () if (Selection.size()) sTmp = getDocument()->getPathOfSelectedPrimitive(); else - sTmp = ""; + sTmp.clear(); m_wndStatusBar.SetPaneText (6, sTmp.c_str()); } @@ -1293,7 +1293,6 @@ struct CViewerConfig LandscapeTileNear = 50.0f; LandscapeThreshold = 0.001f; - HeightFieldName= ""; HeightFieldMaxZ= 100; HeightFieldOriginX= 16000; HeightFieldOriginY= -24000; diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/name_dlg.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/name_dlg.cpp index c71ed31f5..3a1b37d5c 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/name_dlg.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/name_dlg.cpp @@ -231,8 +231,8 @@ void CNameDlg::updateAssignBox() } else { - m_assignGn = ""; - m_assignIg = ""; + m_assignGn.Empty(); + m_assignIg.Empty(); } checkNewGn(); @@ -282,7 +282,8 @@ void CNameDlg::OnBtnReset() m_botNames.Data.clear(); // clear assign box fields - m_assignGn = m_assignIg = ""; + m_assignGn.Empty(); + m_assignIg.Empty(); // load worksheets STRING_MANAGER::loadExcelSheet(m_dataDir + "bot_names.txt", m_botNames, true); diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.cpp index 7e241d215..6153027cc 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor/world_editor_doc.cpp @@ -96,8 +96,8 @@ bool CWorldEditorDoc::newDocument () PropertiesDialogs.clear(); - _DataDir = ""; - _Context = ""; + _DataDir.clear(); + _Context.clear(); // Erase all editable root primitive CDatabaseList::iterator ite = _DataHierarchy.begin(); @@ -1423,7 +1423,7 @@ void CWorldEditorDoc::initPrimitiveParameters (const CPrimitiveClass &primClass, } else { - str->StringArray[i] = ""; + str->StringArray[i].clear(); } } primitive.addPropertyByName (parameter.Name.c_str (), str); @@ -2149,7 +2149,7 @@ bool CWorldEditorDoc::updateDefaultValuesInternal (NLLIGO::IPrimitive &primitive primitive.removePropertyByName (_class->Parameters[i].Name.c_str ()); // Set the value - result[j] = ""; + result[j].clear(); // Add the new property array primitive.addPropertyByName (_class->Parameters[i].Name.c_str (), new CPropertyStringArray (result)); diff --git a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp index e2c560602..6765efff5 100644 --- a/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp +++ b/code/ryzom/tools/leveldesign/world_editor/world_editor_shard_monitor_plugin/plugin.cpp @@ -1157,8 +1157,8 @@ void CPlugin::infoMessage (const char *format, ... ) void CPlugin::updateConnectionState() { _DialogFlag->UpdateData (); - _DialogFlag->Sent = ""; - _DialogFlag->Received = ""; + _DialogFlag->Sent.Empty(); + _DialogFlag->Received.Empty(); _DialogFlag->DownloadValue = (toString("%.1f kB/s", _DialogFlag->Download/1024.0)).c_str(); if (!_Client || !_Client->connected()) { diff --git a/code/ryzom/tools/pd_parser/parser.cpp b/code/ryzom/tools/pd_parser/parser.cpp index 4b5e9f5c1..e1c564c33 100644 --- a/code/ryzom/tools/pd_parser/parser.cpp +++ b/code/ryzom/tools/pd_parser/parser.cpp @@ -366,13 +366,13 @@ bool CDbNode::epilog() readyDb.init("ready"); readyDb.IsInline = false; - readyDb.Proto = ""; + readyDb.Proto.clear(); readyDb.Type = "bool"; readyDb.Description = "Tells if database engine is ready to work.\nEngine may not be ready because PDS is down, not yet ready\nor message queue to PDS is full."; updateDb.init("update"); updateDb.IsInline = false; - updateDb.Proto = ""; + updateDb.Proto.clear(); updateDb.Type = "void"; updateDb.Description = "Update the database engine.\nCall this method once per tick, only if engine is ready (see also ready() above)."; @@ -390,7 +390,7 @@ bool CDbNode::epilog() releaseDb.init("release"); releaseDb.IsInline = false; - releaseDb.Proto = ""; + releaseDb.Proto.clear(); releaseDb.Type = "void"; releaseDb.Description = "Release the whole database engine.\nCall this function at service release."; @@ -2350,7 +2350,7 @@ bool CClassNode::generateContent() UnregisterId.add(unregisterAttributesFunction + "();"); - oeid = ""; + oeid.clear(); if (useEntityId()) { oeid = ", "+getClassKey()->cppName(); diff --git a/code/ryzom/tools/pd_parser/templatizer.cpp b/code/ryzom/tools/pd_parser/templatizer.cpp index cb392ad27..21eb9d765 100644 --- a/code/ryzom/tools/pd_parser/templatizer.cpp +++ b/code/ryzom/tools/pd_parser/templatizer.cpp @@ -111,7 +111,7 @@ TTemplatizerToken getToken(CTemplatizerParser& t, bool skipspc, std::string* val TTemplatizerToken retToken = Identifier; if (value != NULL) - *value = ""; + value->clear(); do { while (isalpha(*t)) @@ -480,7 +480,7 @@ CTemplatizerParser ITemplatizerBloc::parseInternal(CTemplatizerParser ptr) */ CTemplatizerParser CTemplatizerTextBloc::parseInternal(CTemplatizerParser ptr) { - Text = ""; + Text.clear(); ptr = skipSpace(ptr);