| Index: third_party/WebKit/Source/wtf/StringExtras.h
|
| diff --git a/third_party/WebKit/Source/wtf/StringExtras.h b/third_party/WebKit/Source/wtf/StringExtras.h
|
| index dbcfd9098bf9d2c0fdb0047df400a16f3f29c378..7edaa37b10d5008171bd30f843f9a4be85fd2d09 100644
|
| --- a/third_party/WebKit/Source/wtf/StringExtras.h
|
| +++ b/third_party/WebKit/Source/wtf/StringExtras.h
|
| @@ -40,50 +40,50 @@
|
|
|
| #if _MSC_VER < 1900
|
| // snprintf is implemented in VS 2015
|
| -inline int snprintf(char* buffer, size_t count, const char* format, ...)
|
| -{
|
| - int result;
|
| - va_list args;
|
| - va_start(args, format);
|
| - result = _vsnprintf(buffer, count, format, args);
|
| - va_end(args);
|
| +inline int snprintf(char* buffer, size_t count, const char* format, ...) {
|
| + int result;
|
| + va_list args;
|
| + va_start(args, format);
|
| + result = _vsnprintf(buffer, count, format, args);
|
| + va_end(args);
|
|
|
| - // In the case where the string entirely filled the buffer, _vsnprintf will not
|
| - // null-terminate it, but snprintf must.
|
| - if (count > 0)
|
| - buffer[count - 1] = '\0';
|
| + // In the case where the string entirely filled the buffer, _vsnprintf will not
|
| + // null-terminate it, but snprintf must.
|
| + if (count > 0)
|
| + buffer[count - 1] = '\0';
|
|
|
| - return result;
|
| + return result;
|
| }
|
|
|
| -inline double wtf_vsnprintf(char* buffer, size_t count, const char* format, va_list args)
|
| -{
|
| - int result = _vsnprintf(buffer, count, format, args);
|
| +inline double wtf_vsnprintf(char* buffer,
|
| + size_t count,
|
| + const char* format,
|
| + va_list args) {
|
| + int result = _vsnprintf(buffer, count, format, args);
|
|
|
| - // In the case where the string entirely filled the buffer, _vsnprintf will not
|
| - // null-terminate it, but vsnprintf must.
|
| - if (count > 0)
|
| - buffer[count - 1] = '\0';
|
| + // In the case where the string entirely filled the buffer, _vsnprintf will not
|
| + // null-terminate it, but vsnprintf must.
|
| + if (count > 0)
|
| + buffer[count - 1] = '\0';
|
|
|
| - return result;
|
| + return result;
|
| }
|
|
|
| // Work around a difference in Microsoft's implementation of vsnprintf, where
|
| // vsnprintf does not null terminate the buffer. WebKit can rely on the null
|
| // termination. Microsoft's implementation is fixed in VS 2015.
|
| -#define vsnprintf(buffer, count, format, args) wtf_vsnprintf(buffer, count, format, args)
|
| +#define vsnprintf(buffer, count, format, args) \
|
| + wtf_vsnprintf(buffer, count, format, args)
|
| #endif
|
|
|
| -inline int strncasecmp(const char* s1, const char* s2, size_t len)
|
| -{
|
| - return _strnicmp(s1, s2, len);
|
| +inline int strncasecmp(const char* s1, const char* s2, size_t len) {
|
| + return _strnicmp(s1, s2, len);
|
| }
|
|
|
| -inline int strcasecmp(const char* s1, const char* s2)
|
| -{
|
| - return _stricmp(s1, s2);
|
| +inline int strcasecmp(const char* s1, const char* s2) {
|
| + return _stricmp(s1, s2);
|
| }
|
|
|
| #endif
|
|
|
| -#endif // WTF_StringExtras_h
|
| +#endif // WTF_StringExtras_h
|
|
|