remove WITH_EXOTIC_JSON_PARSERS
This commit is contained in:
parent
8e1b47a460
commit
67d2eb9b63
2 changed files with 1 additions and 11 deletions
|
|
@ -20,19 +20,15 @@ namespace fc
|
|||
enum parse_type
|
||||
{
|
||||
legacy_parser = 0,
|
||||
#ifdef WITH_EXOTIC_JSON_PARSERS
|
||||
strict_parser = 1,
|
||||
relaxed_parser = 2,
|
||||
legacy_parser_with_string_doubles = 3,
|
||||
#endif
|
||||
broken_nul_parser = 4
|
||||
};
|
||||
enum output_formatting
|
||||
{
|
||||
stringify_large_ints_and_doubles = 0,
|
||||
#ifdef WITH_EXOTIC_JSON_PARSERS
|
||||
legacy_generator = 1
|
||||
#endif
|
||||
};
|
||||
|
||||
static ostream& to_stream( ostream& out, const fc::string& );
|
||||
|
|
|
|||
|
|
@ -328,11 +328,7 @@ namespace fc
|
|||
if (str == "-." || str == "." || str == "-") // check the obviously wrong things we could have encountered
|
||||
FC_THROW_EXCEPTION(parse_error_exception, "Can't parse token \"${token}\" as a JSON numeric constant", ("token", str));
|
||||
if( dot )
|
||||
return
|
||||
#ifdef WITH_EXOTIC_JSON_PARSERS
|
||||
parser_type == json::legacy_parser_with_string_doubles ? variant(str) :
|
||||
#endif
|
||||
variant(to_double(str));
|
||||
return parser_type == json::legacy_parser_with_string_doubles ? variant(str) : variant(to_double(str));
|
||||
if( neg )
|
||||
return to_int64(str);
|
||||
return to_uint64(str);
|
||||
|
|
@ -764,14 +760,12 @@ namespace fc
|
|||
{
|
||||
case legacy_parser:
|
||||
return variant_from_stream<fc::buffered_istream, legacy_parser>( in, max_depth );
|
||||
#ifdef WITH_EXOTIC_JSON_PARSERS
|
||||
case legacy_parser_with_string_doubles:
|
||||
return variant_from_stream<fc::buffered_istream, legacy_parser_with_string_doubles>( in, max_depth );
|
||||
case strict_parser:
|
||||
return json_relaxed::variant_from_stream<buffered_istream, true>( in, max_depth );
|
||||
case relaxed_parser:
|
||||
return json_relaxed::variant_from_stream<buffered_istream, false>( in, max_depth );
|
||||
#endif
|
||||
case broken_nul_parser:
|
||||
return variant_from_stream<fc::buffered_istream, broken_nul_parser>( in, max_depth );
|
||||
default:
|
||||
|
|
|
|||
Loading…
Reference in a new issue