Fix Linux build broken by use of stricmp and vsnwprintf.
strcasecmp is provided by Source/Core/Common/Src/CommonFuncs.h and vswprintf is overloaded in C++ to take the same parameters as vsnwprintf, according to MSDN. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5470 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
655e3b3381
commit
19e3e6effe
|
@ -157,7 +157,7 @@ std::wstring StringFromFormat(const wchar_t* format, ...)
|
||||||
buf = new wchar_t[newSize + 1];
|
buf = new wchar_t[newSize + 1];
|
||||||
|
|
||||||
va_start(args, format);
|
va_start(args, format);
|
||||||
writtenCount = _vsnwprintf(buf, newSize, format, args);
|
writtenCount = vswprintf(buf, newSize, format, args);
|
||||||
va_end(args);
|
va_end(args);
|
||||||
if (writtenCount >= (int)newSize) {
|
if (writtenCount >= (int)newSize) {
|
||||||
writtenCount = -1;
|
writtenCount = -1;
|
||||||
|
@ -302,12 +302,12 @@ bool TryParseInt(const char* str, int* outVal)
|
||||||
|
|
||||||
bool TryParseBool(const char* str, bool* output)
|
bool TryParseBool(const char* str, bool* output)
|
||||||
{
|
{
|
||||||
if ((str[0] == '1') || !stricmp(str, "true"))
|
if ((str[0] == '1') || !strcasecmp(str, "true"))
|
||||||
{
|
{
|
||||||
*output = true;
|
*output = true;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if (str[0] == '0' || !stricmp(str, "false"))
|
else if (str[0] == '0' || !strcasecmp(str, "false"))
|
||||||
{
|
{
|
||||||
*output = false;
|
*output = false;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue