summaryrefslogtreecommitdiff
path: root/core/variant/variant_parser.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-07-21 10:40:31 +0200
committerHugo Locurcio <hugo.locurcio@hugo.pro>2021-07-21 10:41:08 +0200
commit4bd5e4fd9b80384d511e4c8f2f642b43159aba4c (patch)
tree092ae6bcfd67e321558102c03f162200ba9e909e /core/variant/variant_parser.cpp
parent8cc599db645a356ca6af3bc15e7574fa6e3ada0e (diff)
Use the standard C `INFINITY` and `NAN` constants directly
The `Math_INF` and `Math_NAN` defines were just aliases for those constants, so we might as well use them directly. Some portions of the code were already using `INFINITY` directly.
Diffstat (limited to 'core/variant/variant_parser.cpp')
-rw-r--r--core/variant/variant_parser.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/variant/variant_parser.cpp b/core/variant/variant_parser.cpp
index 86d5ae7f38..f9c604fe3e 100644
--- a/core/variant/variant_parser.cpp
+++ b/core/variant/variant_parser.cpp
@@ -506,9 +506,9 @@ Error VariantParser::parse_value(Token &token, Variant &value, Stream *p_stream,
} else if (id == "null" || id == "nil") {
value = Variant();
} else if (id == "inf") {
- value = Math_INF;
+ value = INFINITY;
} else if (id == "nan") {
- value = Math_NAN;
+ value = NAN;
} else if (id == "Vector2") {
Vector<real_t> args;
Error err = _parse_construct<real_t>(p_stream, args, line, r_err_str);