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

Unified Diff: base/strings/safe_sprintf.h

Issue 368133002: Fixes for re-enabling more MSVC level 4 warnings: base/ edition (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Attempt to fix non-MSVC build Created 6 years, 6 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
Index: base/strings/safe_sprintf.h
diff --git a/base/strings/safe_sprintf.h b/base/strings/safe_sprintf.h
index c9ee717375386f8fc666fa04403c210eafefb3f2..089dc147c42965fb94ebcc03e2075bf6d2b923a0 100644
--- a/base/strings/safe_sprintf.h
+++ b/base/strings/safe_sprintf.h
@@ -139,16 +139,16 @@ struct Arg {
enum Type { INT, UINT, STRING, POINTER };
// Any integer-like value.
- Arg(signed char c) : i(c), width(sizeof(char)), type(INT) { }
- Arg(unsigned char c) : i(c), width(sizeof(char)), type(UINT) { }
- Arg(signed short j) : i(j), width(sizeof(short)), type(INT) { }
- Arg(unsigned short j) : i(j), width(sizeof(short)), type(UINT) { }
- Arg(signed int j) : i(j), width(sizeof(int)), type(INT) { }
- Arg(unsigned int j) : i(j), width(sizeof(int)), type(UINT) { }
- Arg(signed long j) : i(j), width(sizeof(long)), type(INT) { }
- Arg(unsigned long j) : i(j), width(sizeof(long)), type(UINT) { }
- Arg(signed long long j) : i(j), width(sizeof(long long)), type(INT) { }
- Arg(unsigned long long j) : i(j), width(sizeof(long long)), type(UINT) { }
+ Arg(signed char c) : type(INT) { integer = { c, sizeof(char) }; }
+ Arg(unsigned char c) : type(UINT) { integer = { c, sizeof(char) }; }
+ Arg(signed short j) : type(INT) { integer = { j, sizeof(short) }; }
+ Arg(unsigned short j) : type(UINT) { integer = { j, sizeof(short) }; }
+ Arg(signed int j) : type(INT) { integer = { j, sizeof(int) }; }
+ Arg(unsigned int j) : type(UINT) { integer = { j, sizeof(int) }; }
+ Arg(signed long j) : type(INT) { integer = { j, sizeof(long) }; }
+ Arg(unsigned long j) : type(UINT) { integer = { j, sizeof(long) }; }
+ Arg(signed long long j) : type(INT) { integer = { j, sizeof(long long) }; }
+ Arg(unsigned long long j) : type(UINT) { integer = { j, sizeof(long long) }; }
// A C-style text string.
Arg(const char* s) : str(s), type(STRING) { }
@@ -162,7 +162,7 @@ struct Arg {
struct {
int64_t i;
unsigned char width;
- };
+ } integer;
// A C-style text string.
const char* str;
« base/basictypes.h ('K') | « base/process/kill_win.cc ('k') | base/strings/safe_sprintf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698