Browse files

Another simple addition for constructor initialization, PathArgument.

git-svn-id: https://jsoncpp.svn.sourceforge.net/svnroot/jsoncpp/trunk@240 1f120ed1-78a5-a849-adca-83f0a9e25bb6
  • Loading branch information...
1 parent 807ee08 commit 6dc5ccb38fb741e53c9881d37ba8d4baed842cc1 christopherdunn committed with rjeczalik Jun 21, 2011
Showing with 16 additions and 4 deletions.
  1. +16 −4 src/lib_json/json_value.cpp
View
20 src/lib_json/json_value.cpp
@@ -1,4 +1,4 @@
-// Copyright 2007-2010 Baptiste Lepilleur
+// Copyright 2011 Baptiste Lepilleur
// Distributed under MIT license, or public domain if desired and
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
@@ -270,7 +270,7 @@ Value::CZString::isStaticString() const
*/
Value::Value( ValueType type )
: type_( type )
- , allocated_( 0 )
+ , allocated_( false )
# ifdef JSON_VALUE_USE_INTERNAL_MAP
, itemIsUsed_( 0 )
#endif
@@ -314,6 +314,7 @@ Value::Value( ValueType type )
Value::Value( UInt value )
: type_( uintValue )
+ , allocated_( false )
# ifdef JSON_VALUE_USE_INTERNAL_MAP
, itemIsUsed_( 0 )
#endif
@@ -324,6 +325,7 @@ Value::Value( UInt value )
Value::Value( Int value )
: type_( intValue )
+ , allocated_( false )
# ifdef JSON_VALUE_USE_INTERNAL_MAP
, itemIsUsed_( 0 )
#endif
@@ -336,6 +338,7 @@ Value::Value( Int value )
# if defined(JSON_HAS_INT64)
Value::Value( Int64 value )
: type_( intValue )
+ , allocated_( false )
# ifdef JSON_VALUE_USE_INTERNAL_MAP
, itemIsUsed_( 0 )
#endif
@@ -347,6 +350,7 @@ Value::Value( Int64 value )
Value::Value( UInt64 value )
: type_( uintValue )
+ , allocated_( false )
# ifdef JSON_VALUE_USE_INTERNAL_MAP
, itemIsUsed_( 0 )
#endif
@@ -358,6 +362,7 @@ Value::Value( UInt64 value )
Value::Value( double value )
: type_( realValue )
+ , allocated_( false )
# ifdef JSON_VALUE_USE_INTERNAL_MAP
, itemIsUsed_( 0 )
#endif
@@ -432,6 +437,7 @@ Value::Value( const CppTL::ConstString &value )
Value::Value( bool value )
: type_( booleanValue )
+ , allocated_( false )
# ifdef JSON_VALUE_USE_INTERNAL_MAP
, itemIsUsed_( 0 )
#endif
@@ -443,6 +449,7 @@ Value::Value( bool value )
Value::Value( const Value &other )
: type_( other.type_ )
+ , allocated_( false )
# ifdef JSON_VALUE_USE_INTERNAL_MAP
, itemIsUsed_( 0 )
#endif
@@ -1701,27 +1708,32 @@ Value::end()
// //////////////////////////////////////////////////////////////////
PathArgument::PathArgument()
- : kind_( kindNone )
+ : key_()
+ , index_()
+ , kind_( kindNone )
{
}
PathArgument::PathArgument( ArrayIndex index )
- : index_( index )
+ : key_()
+ , index_( index )
, kind_( kindIndex )
{
}
PathArgument::PathArgument( const char *key )
: key_( key )
+ , index_()
, kind_( kindKey )
{
}
PathArgument::PathArgument( const std::string &key )
: key_( key.c_str() )
+ , index_()
, kind_( kindKey )
{
}

0 comments on commit 6dc5ccb

Please sign in to comment.