Fix warning: enumeration value not handled in switch
./src/json.hpp:9339:21: warning: enumeration values 'number_integer', 'number_unsigned',
and 'number_float' not explicitly handled in switch [-Wswitch-enum]
This commit is contained in:
parent
cdecd1b162
commit
523cc21514
@ -9334,7 +9334,6 @@ class basic_json
|
||||
@since version 1.0.0, public since 2.1.0
|
||||
*/
|
||||
std::string type_name() const
|
||||
{
|
||||
{
|
||||
switch (m_type)
|
||||
{
|
||||
@ -9350,10 +9349,12 @@ class basic_json
|
||||
return "boolean";
|
||||
case value_t::discarded:
|
||||
return "discarded";
|
||||
default:
|
||||
case value_t::number_unsigned:
|
||||
case value_t::number_integer:
|
||||
case value_t::number_float:
|
||||
return "number";
|
||||
}
|
||||
}
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -9334,7 +9334,6 @@ class basic_json
|
||||
@since version 1.0.0, public since 2.1.0
|
||||
*/
|
||||
std::string type_name() const
|
||||
{
|
||||
{
|
||||
switch (m_type)
|
||||
{
|
||||
@ -9350,10 +9349,12 @@ class basic_json
|
||||
return "boolean";
|
||||
case value_t::discarded:
|
||||
return "discarded";
|
||||
default:
|
||||
case value_t::number_unsigned:
|
||||
case value_t::number_integer:
|
||||
case value_t::number_float:
|
||||
return "number";
|
||||
}
|
||||
}
|
||||
assert(false);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user