diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2018-02-04 21:39:50 +0000 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2018-02-04 21:39:50 +0000 |
| commit | 4ebaee0f40e30c4da671a9351676e1c9051abbef (patch) | |
| tree | 6dc61d71ffef25d3ce48fc7e700d86eb1c4da06e /nanosvg/nanosvg.h | |
| parent | c97fe2e58ff32c58fa0cc417c1cb78ec579e39fe (diff) | |
Reorganize nanosvg bundled library.
Rename altsvgrast.h to its original name nanosvg.h and use a new
GitHub fork of nanosvg to maintain FLTK specific patches.
https://github.com/fltk/nanosvg
The diff files (altsvgrast.diff and nanosvg.diff) are no longer necessary
and have been removed. For more information see README.bundled-libs.txt.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@12646 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'nanosvg/nanosvg.h')
| -rw-r--r-- | nanosvg/nanosvg.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/nanosvg/nanosvg.h b/nanosvg/nanosvg.h index bd5b722f4..0426b0c3f 100644 --- a/nanosvg/nanosvg.h +++ b/nanosvg/nanosvg.h @@ -1081,7 +1081,7 @@ static double nsvg__atof(const char* s) char* cur = (char*)s; char* end = NULL; double res = 0.0, sign = 1.0; - double intPart = 0, fracPart = 0; + double intPart = 0.0, fracPart = 0.0; char hasIntPart = 0, hasFracPart = 0; // Parse optional sign @@ -1096,12 +1096,12 @@ static double nsvg__atof(const char* s) if (nsvg__isdigit(*cur)) { // Parse digit sequence #ifdef _MSC_VER - intPart = (double)_strtoi64(cur, &end, 10); + intPart = (double)_strtoi64(cur, &end, 10); #else - intPart = (double)strtoll(cur, &end, 10); + intPart = (double)strtoll(cur, &end, 10); #endif if (cur != end) { - res = (double)intPart; + res = intPart; hasIntPart = 1; cur = end; } @@ -1113,12 +1113,12 @@ static double nsvg__atof(const char* s) if (nsvg__isdigit(*cur)) { // Parse digit sequence #ifdef _MSC_VER - fracPart = (double)_strtoi64(cur, &end, 10); + fracPart = (double)_strtoi64(cur, &end, 10); #else - fracPart = (double)strtoll(cur, &end, 10); + fracPart = (double)strtoll(cur, &end, 10); #endif if (cur != end) { - res += (double)fracPart / pow(10.0, (double)(end - cur)); + res += fracPart / pow(10.0, (double)(end - cur)); hasFracPart = 1; cur = end; } @@ -1131,7 +1131,7 @@ static double nsvg__atof(const char* s) // Parse optional exponent if (*cur == 'e' || *cur == 'E') { - double expPart = 0; + double expPart = 0.0; cur++; // skip 'E' expPart = (double)strtol(cur, &end, 10); // Parse digit sequence with sign if (cur != end) { |
