core: convert strtod.c to C++

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-04-23 15:11:29 +08:00
parent b6cabdf023
commit 4ee5d08a46
3 changed files with 4 additions and 4 deletions

View file

@ -93,7 +93,7 @@ SOURCES += subsurface-mobile-main.cpp \
core/selection.cpp \ core/selection.cpp \
core/sha1.c \ core/sha1.c \
core/string-format.cpp \ core/string-format.cpp \
core/strtod.c \ core/strtod.cpp \
core/tag.cpp \ core/tag.cpp \
core/taxonomy.c \ core/taxonomy.c \
core/time.cpp \ core/time.cpp \

View file

@ -169,7 +169,7 @@ set(SUBSURFACE_CORE_LIB_SRCS
statistics.h statistics.h
string-format.h string-format.h
string-format.cpp string-format.cpp
strtod.c strtod.cpp
subsurface-float.h subsurface-float.h
subsurface-string.cpp subsurface-string.cpp
subsurface-string.h subsurface-string.h

View file

@ -109,12 +109,12 @@ no_conversion:
return 0.0; return 0.0;
} }
double permissive_strtod(const char *str, const char **ptr) extern "C" double permissive_strtod(const char *str, const char **ptr)
{ {
return strtod_flags(str, ptr, false); return strtod_flags(str, ptr, false);
} }
double ascii_strtod(const char *str, const char **ptr) extern "C" double ascii_strtod(const char *str, const char **ptr)
{ {
return strtod_flags(str, ptr, true); return strtod_flags(str, ptr, true);
} }