mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 13:37:00 +00:00
[7296] Fixed some GCC warnings.
This commit is contained in:
parent
0be9e35b7b
commit
6793f9256f
4 changed files with 8 additions and 10 deletions
|
|
@ -252,8 +252,9 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize)
|
|||
size_t len = utf8::distance(utf8str,utf8str+csize);
|
||||
if(len > wsize)
|
||||
{
|
||||
if(wsize > 0)
|
||||
wstr[0] = L'\0';
|
||||
wsize = 0;
|
||||
wstr = L"";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -263,8 +264,9 @@ bool Utf8toWStr(char const* utf8str, size_t csize, wchar_t* wstr, size_t& wsize)
|
|||
}
|
||||
catch(std::exception)
|
||||
{
|
||||
if(wsize > 0)
|
||||
wstr[0] = L'\0';
|
||||
wsize = 0;
|
||||
wstr = L"";
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue