#define spirit_namespace boost::spirit\r
#endif\r
\r
+#include "include/assert.h"\r
+\r
namespace json_spirit\r
{\r
const spirit_namespace::int_parser < boost::int64_t > int64_p = spirit_namespace::int_parser < boost::int64_t >();\r
String_type get_str_( typename String_type::const_iterator begin, \r
typename String_type::const_iterator end )\r
{\r
- assert( end - begin >= 2 );\r
+ ceph_assert( end - begin >= 2 );\r
\r
typedef typename String_type::const_iterator Iter_type;\r
\r
\r
void begin_obj( Char_type c )\r
{\r
- assert( c == '{' );\r
+ ceph_assert( c == '{' );\r
\r
begin_compound< Object_type >();\r
}\r
\r
void end_obj( Char_type c )\r
{\r
- assert( c == '}' );\r
+ ceph_assert( c == '}' );\r
\r
end_compound();\r
}\r
\r
void begin_array( Char_type c )\r
{\r
- assert( c == '[' );\r
+ ceph_assert( c == '[' );\r
\r
begin_compound< Array_type >();\r
}\r
\r
void end_array( Char_type c )\r
{\r
- assert( c == ']' );\r
+ ceph_assert( c == ']' );\r
\r
end_compound();\r
}\r
\r
void new_name( Iter_type begin, Iter_type end )\r
{\r
- assert( current_p_->type() == obj_type );\r
+ ceph_assert( current_p_->type() == obj_type );\r
\r
name_ = get_str< String_type >( begin, end );\r
}\r
\r
void new_true( Iter_type begin, Iter_type end )\r
{\r
- assert( is_eq( begin, end, "true" ) );\r
+ ceph_assert( is_eq( begin, end, "true" ) );\r
\r
add_to_current( true );\r
}\r
\r
void new_false( Iter_type begin, Iter_type end )\r
{\r
- assert( is_eq( begin, end, "false" ) );\r
+ ceph_assert( is_eq( begin, end, "false" ) );\r
\r
add_to_current( false );\r
}\r
\r
void new_null( Iter_type begin, Iter_type end )\r
{\r
- assert( is_eq( begin, end, "null" ) );\r
+ ceph_assert( is_eq( begin, end, "null" ) );\r
\r
add_to_current( Value_type() );\r
}\r
\r
Value_type* add_first( const Value_type& value )\r
{\r
- assert( current_p_ == 0 );\r
+ ceph_assert( current_p_ == 0 );\r
\r
value_ = value;\r
current_p_ = &value_;\r
return ¤t_p_->get_array().back(); \r
}\r
\r
- assert( current_p_->type() == obj_type );\r
+ ceph_assert( current_p_->type() == obj_type );\r
\r
return &Config_type::add( current_p_->get_obj(), name_, value );\r
}\r
\r
if( !info.hit )\r
{\r
- assert( false ); // in theory exception should already have been thrown\r
+ ceph_assert( false ); // in theory exception should already have been thrown\r
throw_error( info.stop, "error" );\r
}\r
\r
#include "json_spirit_value.h"\r
#include "json_spirit_writer_options.h"\r
\r
-#include <cassert>\r
#include <sstream>\r
#include <iomanip>\r
#include <boost/io/ios_state.hpp>\r
\r
+#include "include/assert.h"\r
+\r
namespace json_spirit\r
{\r
inline char to_hex_char( unsigned int c )\r
{\r
- assert( c <= 0xF );\r
+ ceph_assert( c <= 0xF );\r
\r
const char ch = static_cast< char >( c );\r
\r
case real_type: output( value.get_real() ); break;\r
case int_type: output_int( value ); break;\r
case null_type: os_ << "null"; break;\r
- default: assert( false );\r
+ default: ceph_assert( false );\r
}\r
}\r
\r