mirror of
https://github.com/ChaiScript/ChaiScript.git
synced 2025-12-06 16:57:04 +08:00
Normalize methods for numeric->string conversions
This commit is contained in:
parent
835b5a90af
commit
6d632f6aa4
@ -523,11 +523,11 @@ namespace chaiscript
|
|||||||
case Common_Types::t_int64:
|
case Common_Types::t_int64:
|
||||||
return std::to_string(get_as<int64_t>());
|
return std::to_string(get_as<int64_t>());
|
||||||
case Common_Types::t_double:
|
case Common_Types::t_double:
|
||||||
return std::to_string(get_as<double>());
|
return to_string_aux<double>(bv);
|
||||||
case Common_Types::t_float:
|
case Common_Types::t_float:
|
||||||
return std::to_string(get_as<float>());
|
return to_string_aux<float>(bv);
|
||||||
case Common_Types::t_long_double:
|
case Common_Types::t_long_double:
|
||||||
return std::to_string(get_as<long double>());
|
return to_string_aux<long double>(bv);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw chaiscript::detail::exception::bad_any_cast();
|
throw chaiscript::detail::exception::bad_any_cast();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user