diff --git a/dic/encoding.cpp b/dic/encoding.cpp index 207d819..5e974bc 100644 --- a/dic/encoding.cpp +++ b/dic/encoding.cpp @@ -181,17 +181,7 @@ string convertToMb(const wstring& iWStr) string convertToMb(wchar_t iWChar) { -#ifdef WIN32 return convertToMb(wstring(1, iWChar)); -#else - char res[MB_CUR_MAX + 1]; - int len = wctomb(res, iWChar); - if (len == -1) - return ""; - res[len] = '\0'; - - return res; -#endif } diff --git a/game/game_io.cpp b/game/game_io.cpp index de233c9..49648ca 100644 --- a/game/game_io.cpp +++ b/game/game_io.cpp @@ -327,7 +327,7 @@ Game* Game::gameLoadFormat_15(FILE *fin, const Dictionary& iDic) int pts; unsigned int player; char bonus = 0; - int res = sscanf(buff, " %2d | %8s | %s | %3s | %3d | %1d | %c", + int res = sscanf(buff, " %2d | %8s | %s | %3s | %3d | %1u | %c", &num, rack, tmpWord, ref, &pts, &player, &bonus); debug(" -- line %s",buff); diff --git a/game/rack.cpp b/game/rack.cpp index cb4c3cb..ac236e5 100644 --- a/game/rack.cpp +++ b/game/rack.cpp @@ -68,7 +68,7 @@ void Rack::getTiles(vector &oTiles) const } -wstring Rack::toString() +wstring Rack::toString() const { wstring rs; for (unsigned int i = 1; i < m_tiles.size(); i++) diff --git a/game/rack.h b/game/rack.h index 7caac53..8a6c4b1 100644 --- a/game/rack.h +++ b/game/rack.h @@ -55,7 +55,7 @@ public: void clear(); void getTiles(vector &oTiles) const; - wstring toString(); + wstring toString() const; private: /// Vector indexed by tile codes, containing the number of tiles