diff --git a/nel/include/nel/misc/ucstring.h b/nel/include/nel/misc/ucstring.h index 8cedb04ec..5f0616d8f 100644 --- a/nel/include/nel/misc/ucstring.h +++ b/nel/include/nel/misc/ucstring.h @@ -128,17 +128,7 @@ public: } /// Converts the controlled ucstring to a string str - void toString (std::string &str) const - { - str.resize (size ()); - for (uint i = 0; i < str.size (); i++) - { - if (operator[](i) > 255) - str[i] = '?'; - else - str[i] = (char) operator[](i); - } - } + void toString(std::string &str) const; /// Converts the controlled ucstring and returns the resulting string std::string toString () const diff --git a/nel/src/misc/ucstring.cpp b/nel/src/misc/ucstring.cpp index 5d7112114..df8f52406 100644 --- a/nel/src/misc/ucstring.cpp +++ b/nel/src/misc/ucstring.cpp @@ -17,6 +17,18 @@ #include "stdmisc.h" #include "nel/misc/ucstring.h" +void ucstring::toString(std::string &str) const +{ + str.resize(size()); + for (uint i = 0; i < str.size (); i++) + { + if (operator[](i) > 255) + str[i] = '?'; + else + str[i] = (char) operator[](i); + } +} + std::string ucstring::toUtf8() const { std::string res;