diff options
| author | Manolo Gouy <Manolo> | 2017-09-06 19:38:56 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2017-09-06 19:38:56 +0000 |
| commit | a222837123345072d8c38c2d599b492b3c4311bd (patch) | |
| tree | 2c3bc5c7d709d9761751ce17b5d9a9f9b080d770 /src | |
| parent | 457fb7c0b281f61fa5da75048a7df26be5de6422 (diff) | |
Simplify code using plain atof() instead of implementing function nsvg__atof().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12430 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_SVG_Image.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Fl_SVG_Image.cxx b/src/Fl_SVG_Image.cxx index 1d508ed6f..87ea71a46 100644 --- a/src/Fl_SVG_Image.cxx +++ b/src/Fl_SVG_Image.cxx @@ -23,15 +23,13 @@ #include <FL/Fl_SVG_Image.H> #include <FL/fl_utf8.h> #include <stdio.h> +#include <stdlib.h> #if HAVE_LOCALE_H #include <locale.h> #endif -static double nsvg__atof(const char* s) { // replace nanosvg's version of this function - double value; - sscanf(s, "%lg", &value); - return value; -} +// the C locale is set in init_() before calling nsvgParse(), therefore plain atof() can be used +#define nsvg__atof(s) atof(s) #define NANOSVG_ALL_COLOR_KEYWORDS // Include full list of color keywords. #define NANOSVG_IMPLEMENTATION // Expands implementation |
