From e3c2cb2a30886120c022c12a9319e4eace4e4528 Mon Sep 17 00:00:00 2001 From: kervala Date: Sun, 30 Oct 2016 15:56:41 +0100 Subject: [PATCH] Changed: Use clear() instead of affectation --HG-- branch : develop --- code/nel/src/gui/view_text.cpp | 2 +- code/nel/src/misc/i18n.cpp | 2 +- code/ryzom/tools/leveldesign/export/tools.cpp | 2 +- code/ryzom/tools/server/ai_build_wmap/main.cpp | 2 +- code/ryzom/tools/translation_tools/main.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/code/nel/src/gui/view_text.cpp b/code/nel/src/gui/view_text.cpp index c88dd8173..a2975fc1a 100644 --- a/code/nel/src/gui/view_text.cpp +++ b/code/nel/src/gui/view_text.cpp @@ -1430,7 +1430,7 @@ namespace NLGUI // Append to the last line _Lines.back()->addWord(ucCurrentWord, 0, wordFormat, _FontWidth, *TextContext); // reset the word - ucCurrentWord = ucstring(""); + ucCurrentWord.clear(); } diff --git a/code/nel/src/misc/i18n.cpp b/code/nel/src/misc/i18n.cpp index 6ac5a9d05..786060275 100644 --- a/code/nel/src/misc/i18n.cpp +++ b/code/nel/src/misc/i18n.cpp @@ -1109,7 +1109,7 @@ void CI18N::_readTextFile(const string &filename, temp.append(result.begin()+lastPos, result.end()); result.swap(temp); - temp = ""; + temp.clear(); // second loop with the '\n' pos = 0; diff --git a/code/ryzom/tools/leveldesign/export/tools.cpp b/code/ryzom/tools/leveldesign/export/tools.cpp index 742359840..6e7dcbad0 100644 --- a/code/ryzom/tools/leveldesign/export/tools.cpp +++ b/code/ryzom/tools/leveldesign/export/tools.cpp @@ -38,7 +38,7 @@ void CTools::mkdir (const string &dirName) } SetCurrentDirectory (newDir.c_str()); // Create upper levels - newDir = ""; + newDir.clear(); string::size_type pos = dirName.rfind('\\'); if (pos != string::npos) { diff --git a/code/ryzom/tools/server/ai_build_wmap/main.cpp b/code/ryzom/tools/server/ai_build_wmap/main.cpp index b4491e640..620823ed8 100644 --- a/code/ryzom/tools/server/ai_build_wmap/main.cpp +++ b/code/ryzom/tools/server/ai_build_wmap/main.cpp @@ -86,7 +86,7 @@ sint main(sint argc, char **argv) if (cmd != "") { commands.push_back(cmd); - cmd = ""; + cmd.clear(); } } else diff --git a/code/ryzom/tools/translation_tools/main.cpp b/code/ryzom/tools/translation_tools/main.cpp index 9f0b33666..8d5609d90 100644 --- a/code/ryzom/tools/translation_tools/main.cpp +++ b/code/ryzom/tools/translation_tools/main.cpp @@ -703,7 +703,7 @@ void cleanComment(const std::string & filename) } } text = newText; - newText = ucstring(""); + newText.clear(); last = 0; while ( last != ucstring::npos) {