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

Unified Diff: third_party/jsoncpp/patches/value.h.diff

Issue 1060383002: Make one-bit bit fields unsigned. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updating README.chromium and putting all changes in patch file. Created 5 years, 8 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/jsoncpp/overrides/include/json/value.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/jsoncpp/patches/value.h.diff
diff --git a/third_party/jsoncpp/patches/value.h.diff b/third_party/jsoncpp/patches/value.h.diff
new file mode 100644
index 0000000000000000000000000000000000000000..bce57b2da7418853e6cde1ccc043d7e0baa39af7
--- /dev/null
+++ b/third_party/jsoncpp/patches/value.h.diff
@@ -0,0 +1,37 @@
+diff --git "a/source\\include\\json\\value.h" "b/overrides\\include\\json\\value.h"
+index b013c9b..5707260 100644
+--- "a/source\\include\\json\\value.h"
++++ "b/overrides\\include\\json\\value.h"
+@@ -7,7 +7,7 @@
+ # define CPPTL_JSON_H_INCLUDED
+
+ #if !defined(JSON_IS_AMALGAMATION)
+-# include "forwards.h"
++# include "third_party/jsoncpp/source/include/json/forwards.h"
+ #endif // if !defined(JSON_IS_AMALGAMATION)
+ # include <string>
+ # include <vector>
+@@ -136,7 +136,7 @@ namespace Json {
+ typedef Json::LargestUInt LargestUInt;
+ typedef Json::ArrayIndex ArrayIndex;
+
+- static const Value null;
++ static const Value& null;
+ /// Minimum signed integer value that can be stored in a Json::Value.
+ static const LargestInt minLargestInt;
+ /// Maximum signed integer value that can be stored in a Json::Value.
+@@ -496,10 +496,12 @@ namespace Json {
+ # endif
+ } value_;
+ ValueType type_ : 8;
+- int allocated_ : 1; // Notes: if declared as bool, bitfield is useless.
++ // One-bit bitfields must be unsigned to allow storing 1.
++ // They must be 32-bits to share storage with ValueHolder.
++ unsigned int allocated_ : 1;
+ # ifdef JSON_VALUE_USE_INTERNAL_MAP
+ unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap container.
+- int memberNameIsStatic_ : 1; // used by the ValueInternalMap container.
++ unsigned int memberNameIsStatic_ : 1; // used by the ValueInternalMap container.
+ # endif
+ CommentInfo *comments_;
+ };
« no previous file with comments | « third_party/jsoncpp/overrides/include/json/value.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698