aboutsummaryrefslogtreecommitdiff
path: root/src/json
diff options
context:
space:
mode:
authorKamil Domanski <kdomanski@kdemail.net>2014-05-05 20:08:13 +0200
committerKamil Domanski <kdomanski@kdemail.net>2014-05-13 11:41:59 +0200
commit4b61a6a47895309ffb059f986a31c4931b8fe0b4 (patch)
tree5b5a011597d5268d828c966287fafeb10e491bcc /src/json
parent29c1fbbb97710a9c31ae594870fc41539425889c (diff)
switch from boost int types to <stdint.h>
Diffstat (limited to 'src/json')
-rw-r--r--src/json/json_spirit_reader_template.h12
-rw-r--r--src/json/json_spirit_value.h31
2 files changed, 21 insertions, 22 deletions
diff --git a/src/json/json_spirit_reader_template.h b/src/json/json_spirit_reader_template.h
index 4dec00e6c9..46f5892f62 100644
--- a/src/json/json_spirit_reader_template.h
+++ b/src/json/json_spirit_reader_template.h
@@ -33,8 +33,8 @@
namespace json_spirit
{
- const spirit_namespace::int_parser < boost::int64_t > int64_p = spirit_namespace::int_parser < boost::int64_t >();
- const spirit_namespace::uint_parser< boost::uint64_t > uint64_p = spirit_namespace::uint_parser< boost::uint64_t >();
+ const spirit_namespace::int_parser < int64_t > int64_p = spirit_namespace::int_parser < int64_t >();
+ const spirit_namespace::uint_parser< uint64_t > uint64_p = spirit_namespace::uint_parser< uint64_t >();
template< class Iter_type >
bool is_eq( Iter_type first, Iter_type last, const char* c_str )
@@ -270,12 +270,12 @@ namespace json_spirit
add_to_current( Value_type() );
}
- void new_int( boost::int64_t i )
+ void new_int( int64_t i )
{
add_to_current( i );
}
- void new_uint64( boost::uint64_t ui )
+ void new_uint64( uint64_t ui )
{
add_to_current( ui );
}
@@ -425,8 +425,8 @@ namespace json_spirit
typedef boost::function< void( Char_type ) > Char_action;
typedef boost::function< void( Iter_type, Iter_type ) > Str_action;
typedef boost::function< void( double ) > Real_action;
- typedef boost::function< void( boost::int64_t ) > Int_action;
- typedef boost::function< void( boost::uint64_t ) > Uint64_action;
+ typedef boost::function< void( int64_t ) > Int_action;
+ typedef boost::function< void( uint64_t ) > Uint64_action;
Char_action begin_obj ( boost::bind( &Semantic_actions_t::begin_obj, &self.actions_, _1 ) );
Char_action end_obj ( boost::bind( &Semantic_actions_t::end_obj, &self.actions_, _1 ) );
diff --git a/src/json/json_spirit_value.h b/src/json/json_spirit_value.h
index 7e83a2a7e3..88c0e1f736 100644
--- a/src/json/json_spirit_value.h
+++ b/src/json/json_spirit_value.h
@@ -17,7 +17,6 @@
#include <sstream>
#include <stdexcept>
#include <boost/config.hpp>
-#include <boost/cstdint.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/variant.hpp>
@@ -45,8 +44,8 @@ namespace json_spirit
Value_impl( const Array& value );
Value_impl( bool value );
Value_impl( int value );
- Value_impl( boost::int64_t value );
- Value_impl( boost::uint64_t value );
+ Value_impl( int64_t value );
+ Value_impl( uint64_t value );
Value_impl( double value );
Value_impl( const Value_impl& other );
@@ -65,8 +64,8 @@ namespace json_spirit
const Array& get_array() const;
bool get_bool() const;
int get_int() const;
- boost::int64_t get_int64() const;
- boost::uint64_t get_uint64() const;
+ int64_t get_int64() const;
+ uint64_t get_uint64() const;
double get_real() const;
Object& get_obj();
@@ -83,7 +82,7 @@ namespace json_spirit
typedef boost::variant< String_type,
boost::recursive_wrapper< Object >, boost::recursive_wrapper< Array >,
- bool, boost::int64_t, double > Variant;
+ bool, int64_t, double > Variant;
Value_type type_;
Variant v_;
@@ -258,13 +257,13 @@ namespace json_spirit
template< class Config >
Value_impl< Config >::Value_impl( int value )
: type_( int_type )
- , v_( static_cast< boost::int64_t >( value ) )
+ , v_( static_cast< int64_t >( value ) )
, is_uint64_( false )
{
}
template< class Config >
- Value_impl< Config >::Value_impl( boost::int64_t value )
+ Value_impl< Config >::Value_impl( int64_t value )
: type_( int_type )
, v_( value )
, is_uint64_( false )
@@ -272,9 +271,9 @@ namespace json_spirit
}
template< class Config >
- Value_impl< Config >::Value_impl( boost::uint64_t value )
+ Value_impl< Config >::Value_impl( uint64_t value )
: type_( int_type )
- , v_( static_cast< boost::int64_t >( value ) )
+ , v_( static_cast< int64_t >( value ) )
, is_uint64_( true )
{
}
@@ -390,19 +389,19 @@ namespace json_spirit
}
template< class Config >
- boost::int64_t Value_impl< Config >::get_int64() const
+ int64_t Value_impl< Config >::get_int64() const
{
check_type( int_type );
- return boost::get< boost::int64_t >( v_ );
+ return boost::get< int64_t >( v_ );
}
template< class Config >
- boost::uint64_t Value_impl< Config >::get_uint64() const
+ uint64_t Value_impl< Config >::get_uint64() const
{
check_type( int_type );
- return static_cast< boost::uint64_t >( get_int64() );
+ return static_cast< uint64_t >( get_int64() );
}
template< class Config >
@@ -481,13 +480,13 @@ namespace json_spirit
}
template< class Value >
- boost::int64_t get_value( const Value& value, Type_to_type< boost::int64_t > )
+ int64_t get_value( const Value& value, Type_to_type< int64_t > )
{
return value.get_int64();
}
template< class Value >
- boost::uint64_t get_value( const Value& value, Type_to_type< boost::uint64_t > )
+ uint64_t get_value( const Value& value, Type_to_type< uint64_t > )
{
return value.get_uint64();
}