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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « third_party/jsoncpp/overrides/include/json/value.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 diff --git "a/source\\include\\json\\value.h" "b/overrides\\include\\json\\value .h"
2 index b013c9b..5707260 100644
3 --- "a/source\\include\\json\\value.h"
4 +++ "b/overrides\\include\\json\\value.h"
5 @@ -7,7 +7,7 @@
6 # define CPPTL_JSON_H_INCLUDED
7
8 #if !defined(JSON_IS_AMALGAMATION)
9 -# include "forwards.h"
10 +# include "third_party/jsoncpp/source/include/json/forwards.h"
11 #endif // if !defined(JSON_IS_AMALGAMATION)
12 # include <string>
13 # include <vector>
14 @@ -136,7 +136,7 @@ namespace Json {
15 typedef Json::LargestUInt LargestUInt;
16 typedef Json::ArrayIndex ArrayIndex;
17
18 - static const Value null;
19 + static const Value& null;
20 /// Minimum signed integer value that can be stored in a Json::Value.
21 static const LargestInt minLargestInt;
22 /// Maximum signed integer value that can be stored in a Json::Value.
23 @@ -496,10 +496,12 @@ namespace Json {
24 # endif
25 } value_;
26 ValueType type_ : 8;
27 - int allocated_ : 1; // Notes: if declared as bool, bitfield is useles s.
28 + // One-bit bitfields must be unsigned to allow storing 1.
29 + // They must be 32-bits to share storage with ValueHolder.
30 + unsigned int allocated_ : 1;
31 # ifdef JSON_VALUE_USE_INTERNAL_MAP
32 unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap contai ner.
33 - int memberNameIsStatic_ : 1; // used by the ValueInternalMap contai ner.
34 + unsigned int memberNameIsStatic_ : 1; // used by the ValueInternalMap con tainer.
35 # endif
36 CommentInfo *comments_;
37 };
OLDNEW
« 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