| Index: sky/engine/wtf/text/WTFString.cpp
|
| diff --git a/sky/engine/wtf/text/WTFString.cpp b/sky/engine/wtf/text/WTFString.cpp
|
| index dfffa6a21ff7887deff386116f976c7192f653b2..e23f7286a6f66ff9dc3003e4fe0c16ef1dc5c902 100644
|
| --- a/sky/engine/wtf/text/WTFString.cpp
|
| +++ b/sky/engine/wtf/text/WTFString.cpp
|
| @@ -469,6 +469,9 @@ String String::format(const char *format, ...)
|
| Vector<char, 256> buffer;
|
|
|
| // Do the format once to get the length.
|
| +#if COMPILER(MSVC)
|
| + int result = _vscprintf(format, args);
|
| +#else
|
| char ch;
|
| int result = vsnprintf(&ch, 1, format, args);
|
| // We need to call va_end() and then va_start() again here, as the
|
| @@ -479,6 +482,7 @@ String String::format(const char *format, ...)
|
| // systems, but fails e.g. on 64bit Linux.
|
| va_end(args);
|
| va_start(args, format);
|
| +#endif
|
|
|
| if (result == 0)
|
| return String("");
|
| @@ -1011,9 +1015,18 @@ static inline IntegralType toIntegralType(const CharType* data, size_t length, b
|
| ++data;
|
| }
|
|
|
| +#if COMPILER(MSVC)
|
| +#pragma warning(push, 0)
|
| +#pragma warning(disable:4146)
|
| +#endif
|
| +
|
| if (isNegative)
|
| value = -value;
|
|
|
| +#if COMPILER(MSVC)
|
| +#pragma warning(pop)
|
| +#endif
|
| +
|
| // skip trailing space
|
| while (length && isSpaceOrNewline(*data)) {
|
| --length;
|
|
|