From 40613ebd21263678ccca63d79bd0853e5d77cca4 Mon Sep 17 00:00:00 2001 From: Dmitrii Maganov Date: Thu, 12 Jan 2023 20:18:23 +0200 Subject: GDScript: Fix typing of iterator in for loop --- core/variant/variant_setget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'core') diff --git a/core/variant/variant_setget.cpp b/core/variant/variant_setget.cpp index b8d4495702..a74556d88f 100644 --- a/core/variant/variant_setget.cpp +++ b/core/variant/variant_setget.cpp @@ -1253,7 +1253,7 @@ bool Variant::iter_init(Variant &r_iter, bool &valid) const { return _data._int > 0; } break; case FLOAT: { - r_iter = 0; + r_iter = 0.0; return _data._float > 0.0; } break; case VECTOR2: { @@ -1457,7 +1457,7 @@ bool Variant::iter_next(Variant &r_iter, bool &valid) const { return true; } break; case FLOAT: { - int64_t idx = r_iter; + double idx = r_iter; idx++; if (idx >= _data._float) { return false; -- cgit v1.2.3