OLD | NEW |
---|---|
1 // Copyright 2007-2010 Baptiste Lepilleur | 1 // Copyright 2007-2010 Baptiste Lepilleur |
2 // Distributed under MIT license, or public domain if desired and | 2 // Distributed under MIT license, or public domain if desired and |
3 // recognized in your jurisdiction. | 3 // recognized in your jurisdiction. |
4 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE | 4 // See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE |
5 | 5 |
6 #ifndef CPPTL_JSON_H_INCLUDED | 6 #ifndef CPPTL_JSON_H_INCLUDED |
7 # define CPPTL_JSON_H_INCLUDED | 7 # define CPPTL_JSON_H_INCLUDED |
8 | 8 |
9 #if !defined(JSON_IS_AMALGAMATION) | 9 #if !defined(JSON_IS_AMALGAMATION) |
10 # include "third_party/jsoncpp/source/include/json/forwards.h" | 10 # include "third_party/jsoncpp/source/include/json/forwards.h" |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
489 bool bool_; | 489 bool bool_; |
490 char *string_; | 490 char *string_; |
491 # ifdef JSON_VALUE_USE_INTERNAL_MAP | 491 # ifdef JSON_VALUE_USE_INTERNAL_MAP |
492 ValueInternalArray *array_; | 492 ValueInternalArray *array_; |
493 ValueInternalMap *map_; | 493 ValueInternalMap *map_; |
494 #else | 494 #else |
495 ObjectValues *map_; | 495 ObjectValues *map_; |
496 # endif | 496 # endif |
497 } value_; | 497 } value_; |
498 ValueType type_ : 8; | 498 ValueType type_ : 8; |
499 int allocated_ : 1; // Notes: if declared as bool, bitfield is useless . | 499 // One-bit bitfields must be unsigned to allow storing 1. |
500 // They must be 32-bits to share storage with ValueHolder. | |
501 unsigned allocated_ : 1; | |
scottmg
2015/04/13 22:45:51
can you make these `unsigned int` to match the oth
| |
500 # ifdef JSON_VALUE_USE_INTERNAL_MAP | 502 # ifdef JSON_VALUE_USE_INTERNAL_MAP |
501 unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap contain er. | 503 unsigned int itemIsUsed_ : 1; // used by the ValueInternalMap contain er. |
502 int memberNameIsStatic_ : 1; // used by the ValueInternalMap contain er. | 504 unsigned memberNameIsStatic_ : 1; // used by the ValueInternalMap co ntainer. |
503 # endif | 505 # endif |
504 CommentInfo *comments_; | 506 CommentInfo *comments_; |
505 }; | 507 }; |
506 | 508 |
507 | 509 |
508 /** \brief Experimental and untested: represents an element of the "path" to access a node. | 510 /** \brief Experimental and untested: represents an element of the "path" to access a node. |
509 */ | 511 */ |
510 class PathArgument | 512 class PathArgument |
511 { | 513 { |
512 public: | 514 public: |
(...skipping 587 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1100 { | 1102 { |
1101 return deref(); | 1103 return deref(); |
1102 } | 1104 } |
1103 }; | 1105 }; |
1104 | 1106 |
1105 | 1107 |
1106 } // namespace Json | 1108 } // namespace Json |
1107 | 1109 |
1108 | 1110 |
1109 #endif // CPPTL_JSON_H_INCLUDED | 1111 #endif // CPPTL_JSON_H_INCLUDED |
OLD | NEW |