@@ -241,15 +241,15 @@ void Value::CommentInfo::setComment(const char* text, size_t len) {
241241// Notes: policy_ indicates if the string was allocated when
242242// a string is stored.
243243
244- Value::CZString::CZString (ArrayIndex aindex ) : cstr_(0 ), index_(aindex ) {}
244+ Value::CZString::CZString (ArrayIndex index ) : cstr_(0 ), index_(index ) {}
245245
246246Value::CZString::CZString (char const * str,
247- unsigned ulength ,
247+ unsigned length ,
248248 DuplicationPolicy allocate)
249249 : cstr_(str) {
250250 // allocate != duplicate
251251 storage_.policy_ = allocate & 0x3 ;
252- storage_.length_ = ulength & 0x3FFFFFFF ;
252+ storage_.length_ = length & 0x3FFFFFFF ;
253253}
254254
255255Value::CZString::CZString (const CZString& other) {
@@ -357,10 +357,10 @@ bool Value::CZString::isStaticString() const {
357357 * memset( this, 0, sizeof(Value) )
358358 * This optimization is used in ValueInternalMap fast allocator.
359359 */
360- Value::Value (ValueType vtype ) {
360+ Value::Value (ValueType type ) {
361361 static char const emptyString[] = " " ;
362- initBasic (vtype );
363- switch (vtype ) {
362+ initBasic (type );
363+ switch (type ) {
364364 case nullValue:
365365 break ;
366366 case intValue:
@@ -418,10 +418,10 @@ Value::Value(const char* value) {
418418 value, static_cast <unsigned >(strlen (value)));
419419}
420420
421- Value::Value (const char * beginValue , const char * endValue ) {
421+ Value::Value (const char * begin , const char * end ) {
422422 initBasic (stringValue, true );
423423 value_.string_ = duplicateAndPrefixStringValue (
424- beginValue , static_cast <unsigned >(endValue - beginValue ));
424+ begin , static_cast <unsigned >(end - begin ));
425425}
426426
427427Value::Value (const JSONCPP_STRING& value) {
@@ -645,14 +645,14 @@ unsigned Value::getCStringLength() const {
645645}
646646#endif
647647
648- bool Value::getString (char const ** str , char const ** cend ) const {
648+ bool Value::getString (char const ** begin , char const ** end ) const {
649649 if (type_ != stringValue)
650650 return false ;
651651 if (value_.string_ == 0 )
652652 return false ;
653653 unsigned length;
654- decodePrefixedString (this ->allocated_ , this ->value_ .string_ , &length, str );
655- *cend = *str + length;
654+ decodePrefixedString (this ->allocated_ , this ->value_ .string_ , &length, begin );
655+ *end = *begin + length;
656656 return true ;
657657}
658658
@@ -1003,8 +1003,8 @@ const Value& Value::operator[](int index) const {
10031003 return (*this )[ArrayIndex (index)];
10041004}
10051005
1006- void Value::initBasic (ValueType vtype , bool allocated) {
1007- type_ = vtype ;
1006+ void Value::initBasic (ValueType type , bool allocated) {
1007+ type_ = type ;
10081008 allocated_ = allocated;
10091009 comments_ = 0 ;
10101010 start_ = 0 ;
@@ -1101,13 +1101,13 @@ Value& Value::resolveReference(const char* key) {
11011101}
11021102
11031103// @param key is not null-terminated.
1104- Value& Value::resolveReference (char const * key, char const * cend ) {
1104+ Value& Value::resolveReference (char const * key, char const * end ) {
11051105 JSON_ASSERT_MESSAGE (
11061106 type_ == nullValue || type_ == objectValue,
11071107 " in Json::Value::resolveReference(key, end): requires objectValue" );
11081108 if (type_ == nullValue)
11091109 *this = Value (objectValue);
1110- CZString actualKey (key, static_cast <unsigned >(cend - key),
1110+ CZString actualKey (key, static_cast <unsigned >(end - key),
11111111 CZString::duplicateOnCopy);
11121112 ObjectValues::iterator it = value_.map_ ->lower_bound (actualKey);
11131113 if (it != value_.map_ ->end () && (*it).first == actualKey)
@@ -1126,13 +1126,13 @@ Value Value::get(ArrayIndex index, const Value& defaultValue) const {
11261126
11271127bool Value::isValidIndex (ArrayIndex index) const { return index < size (); }
11281128
1129- Value const * Value::find (char const * key , char const * cend ) const {
1129+ Value const * Value::find (char const * begin , char const * end ) const {
11301130 JSON_ASSERT_MESSAGE (type_ == nullValue || type_ == objectValue,
11311131 " in Json::Value::find(key, end, found): requires "
11321132 " objectValue or nullValue" );
11331133 if (type_ == nullValue)
11341134 return NULL ;
1135- CZString actualKey (key , static_cast <unsigned >(cend - key ),
1135+ CZString actualKey (begin , static_cast <unsigned >(end - begin ),
11361136 CZString::noDuplication);
11371137 ObjectValues::const_iterator it = value_.map_ ->find (actualKey);
11381138 if (it == value_.map_ ->end ())
@@ -1184,10 +1184,10 @@ Value& Value::append(Value&& value) {
11841184}
11851185#endif
11861186
1187- Value Value::get (char const * key ,
1188- char const * cend ,
1187+ Value Value::get (char const * begin ,
1188+ char const * end ,
11891189 Value const & defaultValue) const {
1190- Value const * found = find (key, cend );
1190+ Value const * found = find (begin, end );
11911191 return !found ? defaultValue : *found;
11921192}
11931193Value Value::get (char const * key, Value const & defaultValue) const {
@@ -1197,11 +1197,11 @@ Value Value::get(JSONCPP_STRING const& key, Value const& defaultValue) const {
11971197 return get (key.data (), key.data () + key.length (), defaultValue);
11981198}
11991199
1200- bool Value::removeMember (const char * key , const char * cend , Value* removed) {
1200+ bool Value::removeMember (const char * begin , const char * end , Value* removed) {
12011201 if (type_ != objectValue) {
12021202 return false ;
12031203 }
1204- CZString actualKey (key , static_cast <unsigned >(cend - key ),
1204+ CZString actualKey (begin , static_cast <unsigned >(end - begin ),
12051205 CZString::noDuplication);
12061206 ObjectValues::iterator it = value_.map_ ->find (actualKey);
12071207 if (it == value_.map_ ->end ())
@@ -1264,8 +1264,8 @@ Value Value::get(const CppTL::ConstString& key,
12641264}
12651265#endif
12661266
1267- bool Value::isMember (char const * key , char const * cend ) const {
1268- Value const * value = find (key, cend );
1267+ bool Value::isMember (char const * begin , char const * end ) const {
1268+ Value const * value = find (begin, end );
12691269 return NULL != value;
12701270}
12711271bool Value::isMember (char const * key) const {
0 commit comments