1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-28 12:02:00 +03:00

🚧 add more annotations

This commit is contained in:
Niels Lohmann
2019-07-02 20:25:51 +02:00
parent 90798caa62
commit 346e9813c5
3 changed files with 13 additions and 0 deletions

View File

@ -7083,6 +7083,7 @@ class lexer
/// return name of values of type token_type (only used for errors)
JSON_HEDLEY_RETURNS_NON_NULL
JSON_HEDLEY_CONST
static const char* token_type_name(const token_type t) noexcept
{
switch (t)
@ -7142,6 +7143,7 @@ class lexer
/////////////////////
/// return the locale-dependent decimal point
JSON_HEDLEY_PURE
static char get_decimal_point() noexcept
{
const auto loc = localeconv();
@ -7840,18 +7842,21 @@ class lexer
}
JSON_HEDLEY_NON_NULL(2)
JSON_HEDLEY_CONST
static void strtof(float& f, const char* str, char** endptr) noexcept
{
f = std::strtof(str, endptr);
}
JSON_HEDLEY_NON_NULL(2)
JSON_HEDLEY_CONST
static void strtof(double& f, const char* str, char** endptr) noexcept
{
f = std::strtod(str, endptr);
}
JSON_HEDLEY_NON_NULL(2)
JSON_HEDLEY_CONST
static void strtof(long double& f, const char* str, char** endptr) noexcept
{
f = std::strtold(str, endptr);