diff --git a/include/core/PoolArrays.hpp b/include/core/PoolArrays.hpp index eba7b9ca..bc681ac0 100644 --- a/include/core/PoolArrays.hpp +++ b/include/core/PoolArrays.hpp @@ -104,7 +104,7 @@ public: void set(const int idx, const uint8_t data); - const uint8_t operator [](const int idx); + uint8_t operator [](const int idx); int size() const; @@ -200,7 +200,7 @@ public: void set(const int idx, const int data); - const int operator [](const int idx); + int operator [](const int idx); int size() const; @@ -296,7 +296,7 @@ public: void set(const int idx, const real_t data); - const real_t operator [](const int idx); + real_t operator [](const int idx); int size() const; diff --git a/src/core/PoolArrays.cpp b/src/core/PoolArrays.cpp index 8a6f9f80..7f82720d 100644 --- a/src/core/PoolArrays.cpp +++ b/src/core/PoolArrays.cpp @@ -86,7 +86,7 @@ void PoolByteArray::set(const int idx, const uint8_t data) godot::api->godot_pool_byte_array_set(&_godot_array, idx, data); } -const uint8_t PoolByteArray::operator [](const int idx) +uint8_t PoolByteArray::operator [](const int idx) { return godot::api->godot_pool_byte_array_get(&_godot_array, idx); } @@ -180,7 +180,7 @@ void PoolIntArray::set(const int idx, const int data) godot::api->godot_pool_int_array_set(&_godot_array, idx, data); } -const int PoolIntArray::operator [](const int idx) +int PoolIntArray::operator [](const int idx) { return godot::api->godot_pool_int_array_get(&_godot_array, idx); } @@ -273,7 +273,7 @@ void PoolRealArray::set(const int idx, const real_t data) godot::api->godot_pool_real_array_set(&_godot_array, idx, data); } -const real_t PoolRealArray::operator [](const int idx) +real_t PoolRealArray::operator [](const int idx) { return godot::api->godot_pool_real_array_get(&_godot_array, idx); }