@@ -2984,9 +2984,9 @@ int Json_wrapper::compare(const Json_wrapper &other) const
2984
2984
return 1 ; /* purecov: inspected */
2985
2985
return -compare_json_decimal_int (b_dec, get_int ());
2986
2986
}
2987
- default :
2988
- break ;
2987
+ default :;
2989
2988
}
2989
+ break ;
2990
2990
case enum_json_type::J_UINT:
2991
2991
// Unsigned integers can be compared to all other numbers.
2992
2992
switch (other_type)
@@ -3004,31 +3004,29 @@ int Json_wrapper::compare(const Json_wrapper &other) const
3004
3004
return 1 ; /* purecov: inspected */
3005
3005
return -compare_json_decimal_uint (b_dec, get_uint ());
3006
3006
}
3007
- default :
3008
- break ;
3007
+ default :;
3009
3008
}
3009
+ break ;
3010
3010
case enum_json_type::J_DOUBLE:
3011
3011
// Doubles can be compared to all other numbers.
3012
+ switch (other_type)
3012
3013
{
3013
- switch (other_type)
3014
+ case enum_json_type::J_DOUBLE:
3015
+ return compare_numbers (get_double (), other.get_double ());
3016
+ case enum_json_type::J_INT:
3017
+ return compare_json_double_int (get_double (), other.get_int ());
3018
+ case enum_json_type::J_UINT:
3019
+ return compare_json_double_uint (get_double (), other.get_uint ());
3020
+ case enum_json_type::J_DECIMAL:
3014
3021
{
3015
- case enum_json_type::J_DOUBLE:
3016
- return compare_numbers (get_double (), other.get_double ());
3017
- case enum_json_type::J_INT:
3018
- return compare_json_double_int (get_double (), other.get_int ());
3019
- case enum_json_type::J_UINT:
3020
- return compare_json_double_uint (get_double (), other.get_uint ());
3021
- case enum_json_type::J_DECIMAL:
3022
- {
3023
- my_decimal other_dec;
3024
- if (other.get_decimal_data (&other_dec))
3025
- return 1 ; /* purecov: inspected */
3026
- return -compare_json_decimal_double (other_dec, get_double ());
3027
- }
3028
- default :
3029
- break ;
3022
+ my_decimal other_dec;
3023
+ if (other.get_decimal_data (&other_dec))
3024
+ return 1 ; /* purecov: inspected */
3025
+ return -compare_json_decimal_double (other_dec, get_double ());
3030
3026
}
3027
+ default :;
3031
3028
}
3029
+ break ;
3032
3030
case enum_json_type::J_DECIMAL:
3033
3031
// Decimals can be compared to all other numbers.
3034
3032
{
@@ -3054,9 +3052,9 @@ int Json_wrapper::compare(const Json_wrapper &other) const
3054
3052
return compare_json_decimal_uint (a_dec, other.get_uint ());
3055
3053
case enum_json_type::J_DOUBLE:
3056
3054
return compare_json_decimal_double (a_dec, other.get_double ());
3057
- default :
3058
- break ;
3055
+ default :;
3059
3056
}
3057
+ break ;
3060
3058
}
3061
3059
case enum_json_type::J_BOOLEAN:
3062
3060
// Booleans are only equal to other booleans. false is less than true.
0 commit comments