Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Unified Diff: third_party/WebKit/Source/wtf/StringExtras.h

Issue 1611343002: wtf reformat test Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pydent Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/wtf/StdLibExtras.h ('k') | third_party/WebKit/Source/wtf/StringExtrasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « third_party/WebKit/Source/wtf/StdLibExtras.h ('k') | third_party/WebKit/Source/wtf/StringExtrasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698