From baddc2ae66fe62f836cf203c523e82ae2c44e62c Mon Sep 17 00:00:00 2001 From: Marcelo Fernandez Date: Sat, 23 Jun 2018 12:15:53 -0300 Subject: [PATCH] Fix clang warning: 'const' type qualifier on return type has no effect --- include/core/PoolArrays.hpp | 6 +++--- src/core/PoolArrays.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) 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); }