diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2015-02-27 14:00:32 +0100 |
---|---|---|
committer | Erik Verbruggen <erik.verbruggen@theqtcompany.com> | 2015-02-27 13:02:36 +0000 |
commit | 8e428b63b8fc036a4517e569346961d9de5b2825 (patch) | |
tree | 1507255d5d4051ee031969d52b1a4b0a3cd6d3ec /src/script | |
parent | 6354ae029645bdc8c3a540187453529acbf5380a (diff) | |
download | qtscript-8e428b63b8fc036a4517e569346961d9de5b2825.tar.gz |
Use QByteArray::toDouble() instead of qstrtod.
No need to use a secretly exported symbol.
Change-Id: I3336d57def315e1de1a25dfecbadcaf2459fc039
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/parser/qscriptlexer.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/script/parser/qscriptlexer.cpp b/src/script/parser/qscriptlexer.cpp index 637b4f4..1f2948d 100644 --- a/src/script/parser/qscriptlexer.cpp +++ b/src/script/parser/qscriptlexer.cpp @@ -31,8 +31,6 @@ QT_BEGIN_NAMESPACE -Q_CORE_EXPORT double qstrtod(const char *s00, char const **se, bool *ok); - #define shiftWindowsLineBreak() \ do { \ if (((current == '\r') && (next1 == '\n')) \ @@ -712,7 +710,7 @@ int QScript::Lexer::lex() double dval = 0; if (state == Number) { - dval = qstrtod(buffer8, 0, 0); + dval = QByteArray::fromRawData(buffer8, pos8).toDouble(); } else if (state == Hex) { // scan hex numbers dval = QScript::integerFromString(buffer8, pos8, 16); state = Number; |