mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
common Util: Move to before decimal part calculation
This commit is contained in:
parent
439c918553
commit
1769e1c4af
1 changed files with 4 additions and 2 deletions
|
@ -137,11 +137,13 @@ float svgUtilStrtof(const char *nPtr, char **endPtr)
|
||||||
pow10 *= 10ULL;
|
pow10 *= 10ULL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else if (isspace(*iter)) { //skip if there is a space after the dot.
|
||||||
|
a = iter;
|
||||||
|
goto success;
|
||||||
}
|
}
|
||||||
|
|
||||||
val += static_cast<float>(decimalPart) / static_cast<float>(pow10);
|
val += static_cast<float>(decimalPart) / static_cast<float>(pow10);
|
||||||
a = iter;
|
a = iter;
|
||||||
//skip if there is a space after the dot.
|
|
||||||
if (isspace(*a)) goto success;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Optional: exponent
|
//Optional: exponent
|
||||||
|
|
Loading…
Add table
Reference in a new issue