summaryrefslogtreecommitdiff
path: root/core/variant_parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/variant_parser.cpp')
-rw-r--r--core/variant_parser.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/core/variant_parser.cpp b/core/variant_parser.cpp
index 398f20caf3..65c7b7cfec 100644
--- a/core/variant_parser.cpp
+++ b/core/variant_parser.cpp
@@ -3,7 +3,7 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* https://godotengine.org */
/*************************************************************************/
/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
@@ -326,6 +326,7 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
is_float = true;
} else if (c == 'e') {
reading = READING_EXP;
+ is_float = true;
} else {
reading = READING_DONE;
}
@@ -337,7 +338,6 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
} else if (c == 'e') {
reading = READING_EXP;
-
} else {
reading = READING_DONE;
}
@@ -349,8 +349,6 @@ Error VariantParser::get_token(Stream *p_stream, Token &r_token, int &line, Stri
exp_beg = true;
} else if ((c == '-' || c == '+') && !exp_sign && !exp_beg) {
- if (c == '-')
- is_float = true;
exp_sign = true;
} else {
@@ -744,7 +742,7 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
return err;
if (token.type == TK_PARENTHESIS_CLOSE) {
- Reference *reference = obj->cast_to<Reference>();
+ Reference *reference = Object::cast_to<Reference>(obj);
if (reference) {
value = REF(reference);
} else {