Bug 519794. Add a comment about using PR_strtod. r=jwatt

This commit is contained in:
Jeff Muizelaar 2009-10-02 18:08:34 -04:00
parent 0d2d8d41c8
commit e800617174

View File

@ -184,6 +184,10 @@ nsresult nsSVGDataParser::MatchNumber(float* aX)
} }
char* end; char* end;
/* PR_strtod is not particularily fast. We only need a float and not a double so
* we could probably use something faster here if needed. The CSS parser uses
* nsCSSScanner::ParseNumber() instead of PR_strtod. See bug 516396 for some
* additional info. */
*aX = float(PR_strtod(pos, &end)); *aX = float(PR_strtod(pos, &end));
if (pos != end && NS_FloatIsFinite(*aX)) { if (pos != end && NS_FloatIsFinite(*aX)) {
return NS_OK; return NS_OK;