improve conversions std::string <=> std::wstring

This commit is contained in:
Andrzej Rybczak
2009-03-26 12:00:11 +01:00
parent 79ac343fc0
commit 48f3361e2d
4 changed files with 15 additions and 56 deletions

View File

@@ -194,17 +194,10 @@ Scrollpad &Scrollpad::operator<<(std::ostream &(*os)(std::ostream&))
}
#ifdef _UTF8
Scrollpad &Scrollpad::operator<<(const char *s)
{
wchar_t *ws = ToWString(s);
itsBuffer << ws;
delete [] ws;
return *this;
}
Scrollpad &Scrollpad::operator<<(const std::string &s)
{
return operator<<(s.c_str());
itsBuffer << ToWString(s);
return *this;
}
#endif // _UTF8