diff --git a/src/gmio_core/internal/string_utils.h b/src/gmio_core/internal/string_utils.h index cca16df..b4ab399 100644 --- a/src/gmio_core/internal/string_utils.h +++ b/src/gmio_core/internal/string_utils.h @@ -106,7 +106,7 @@ int gmio_ascii_isdigit(char c) return isdigit(c); #else /* 48 <= c <= 57 */ - return (uint8_t) (c - 48) < 10; + return (uint8_t)(c - 48) < 10; #endif } @@ -116,7 +116,7 @@ int gmio_ascii_isupper(char c) return isupper(c); #else /* 65 <= c <= 90; */ - return (uint8_t) (c - 65) < 26; + return (uint8_t)(c - 65) < 26; #endif } @@ -126,7 +126,7 @@ int gmio_ascii_islower(char c) return islower(c); #else /* 97 <= c <= 122; */ - return (uint8_t) (c - 97) < 26; + return (uint8_t)(c - 97) < 26; #endif } diff --git a/src/gmio_core/internal/stringstream_fast_atof.h b/src/gmio_core/internal/stringstream_fast_atof.h index 4ab84b2..b0ee48f 100644 --- a/src/gmio_core/internal/stringstream_fast_atof.h +++ b/src/gmio_core/internal/stringstream_fast_atof.h @@ -32,9 +32,9 @@ GMIO_INLINE int32_t gmio_stringstream_strtol10( const char* in = gmio_stringstream_current_char(sstream); const gmio_bool_t inv = (*in == '-'); int value = 0; + if (inv || *in == '+') in = gmio_stringstream_next_char(sstream); - value = gmio_stringstream_strtoul10(sstream); if (inv) value = -value;