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 committed by bstoeger
parent 092035d883
commit e3f6496f59
3 changed files with 4 additions and 4 deletions

View file

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

View file

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

View file

@ -109,12 +109,12 @@ no_conversion:
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);
}
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);
}