From 67d2eb9b636a313464065d49c300e552fe83d7c2 Mon Sep 17 00:00:00 2001 From: Alfredo Date: Mon, 8 Oct 2018 19:35:56 -0300 Subject: [PATCH] remove WITH_EXOTIC_JSON_PARSERS --- include/fc/io/json.hpp | 4 ---- src/io/json.cpp | 8 +------- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/include/fc/io/json.hpp b/include/fc/io/json.hpp index 1980f74..2d1f306 100644 --- a/include/fc/io/json.hpp +++ b/include/fc/io/json.hpp @@ -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& ); diff --git a/src/io/json.cpp b/src/io/json.cpp index b9afc75..2af0ab7 100644 --- a/src/io/json.cpp +++ b/src/io/json.cpp @@ -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( in, max_depth ); -#ifdef WITH_EXOTIC_JSON_PARSERS case legacy_parser_with_string_doubles: return variant_from_stream( in, max_depth ); case strict_parser: return json_relaxed::variant_from_stream( in, max_depth ); case relaxed_parser: return json_relaxed::variant_from_stream( in, max_depth ); -#endif case broken_nul_parser: return variant_from_stream( in, max_depth ); default: