diff options
-rw-r--r-- | core/ustring.cpp | 2 | ||||
-rw-r--r-- | core/ustring.h | 8 | ||||
-rw-r--r-- | modules/bullet/rigid_body_bullet.h | 2 | ||||
-rw-r--r-- | modules/gdnative/arvr/arvr_interface_gdnative.cpp | 2 | ||||
-rw-r--r-- | modules/gdscript/gdscript_tokenizer.h | 6 | ||||
-rw-r--r-- | servers/physics/collision_object_sw.h | 2 |
6 files changed, 10 insertions, 12 deletions
diff --git a/core/ustring.cpp b/core/ustring.cpp index 17b52035dd..b9914fb530 100644 --- a/core/ustring.cpp +++ b/core/ustring.cpp @@ -2393,7 +2393,7 @@ int String::find(const char *p_str, int p_from) const { return -1; } -int String::find_char(CharType p_char, int p_from) const { +int String::find_char(const CharType &p_char, int p_from) const { return _cowdata.find(p_char, p_from); } diff --git a/core/ustring.h b/core/ustring.h index 5ec5c79e2d..cb3d87378a 100644 --- a/core/ustring.h +++ b/core/ustring.h @@ -85,8 +85,7 @@ public: _FORCE_INLINE_ int size() const { return _cowdata.size(); } Error resize(int p_size) { return _cowdata.resize(p_size); } - _FORCE_INLINE_ char get(int p_index) { return _cowdata.get(p_index); } - _FORCE_INLINE_ const char get(int p_index) const { return _cowdata.get(p_index); } + _FORCE_INLINE_ char get(int p_index) const { return _cowdata.get(p_index); } _FORCE_INLINE_ void set(int p_index, const char &p_elem) { _cowdata.set(p_index, p_elem); } _FORCE_INLINE_ const char &operator[](int p_index) const { if (unlikely(p_index == _cowdata.size())) @@ -143,8 +142,7 @@ public: _FORCE_INLINE_ void clear() { resize(0); } - _FORCE_INLINE_ CharType get(int p_index) { return _cowdata.get(p_index); } - _FORCE_INLINE_ const CharType get(int p_index) const { return _cowdata.get(p_index); } + _FORCE_INLINE_ CharType get(int p_index) const { return _cowdata.get(p_index); } _FORCE_INLINE_ void set(int p_index, const CharType &p_elem) { _cowdata.set(p_index, p_elem); } _FORCE_INLINE_ int size() const { return _cowdata.size(); } Error resize(int p_size) { return _cowdata.resize(p_size); } @@ -197,7 +195,7 @@ public: String substr(int p_from, int p_chars) const; int find(const String &p_str, int p_from = 0) const; ///< return <0 if failed int find(const char *p_str, int p_from = 0) const; ///< return <0 if failed - int find_char(CharType p_char, int p_from = 0) const; ///< return <0 if failed + int find_char(const CharType &p_char, int p_from = 0) const; ///< return <0 if failed int find_last(const String &p_str) const; ///< return <0 if failed int findn(const String &p_str, int p_from = 0) const; ///< return <0 if failed, case insensitive int rfind(const String &p_str, int p_from = -1) const; ///< return <0 if failed diff --git a/modules/bullet/rigid_body_bullet.h b/modules/bullet/rigid_body_bullet.h index 784e99ab86..1e1bea846a 100644 --- a/modules/bullet/rigid_body_bullet.h +++ b/modules/bullet/rigid_body_bullet.h @@ -167,7 +167,7 @@ public: KinematicShape() : shape(NULL) {} - const bool is_active() const { return shape; } + bool is_active() const { return shape; } }; struct KinematicUtilities { diff --git a/modules/gdnative/arvr/arvr_interface_gdnative.cpp b/modules/gdnative/arvr/arvr_interface_gdnative.cpp index 11509fc20a..9cd37ac950 100644 --- a/modules/gdnative/arvr/arvr_interface_gdnative.cpp +++ b/modules/gdnative/arvr/arvr_interface_gdnative.cpp @@ -223,7 +223,7 @@ void GDAPI godot_arvr_register_interface(const godot_arvr_interface_gdnative *p_ Ref<ARVRInterfaceGDNative> new_interface; new_interface.instance(); - new_interface->set_interface((godot_arvr_interface_gdnative *const)p_interface); + new_interface->set_interface((const godot_arvr_interface_gdnative *)p_interface); ARVRServer::get_singleton()->add_interface(new_interface); } diff --git a/modules/gdscript/gdscript_tokenizer.h b/modules/gdscript/gdscript_tokenizer.h index 88e44c6e0f..7b977ff67c 100644 --- a/modules/gdscript/gdscript_tokenizer.h +++ b/modules/gdscript/gdscript_tokenizer.h @@ -173,7 +173,7 @@ public: #ifdef DEBUG_ENABLED virtual const Vector<Pair<int, String> > &get_warning_skips() const = 0; virtual const Set<String> &get_warning_global_skips() const = 0; - virtual const bool is_ignoring_warnings() const = 0; + virtual bool is_ignoring_warnings() const = 0; #endif // DEBUG_ENABLED virtual ~GDScriptTokenizer(){}; @@ -245,7 +245,7 @@ public: #ifdef DEBUG_ENABLED virtual const Vector<Pair<int, String> > &get_warning_skips() const { return warning_skips; } virtual const Set<String> &get_warning_global_skips() const { return warning_global_skips; } - virtual const bool is_ignoring_warnings() const { return ignore_warnings; } + virtual bool is_ignoring_warnings() const { return ignore_warnings; } #endif // DEBUG_ENABLED }; @@ -289,7 +289,7 @@ public: static Set<String> s; return s; } - virtual const bool is_ignoring_warnings() const { return true; } + virtual bool is_ignoring_warnings() const { return true; } #endif // DEBUG_ENABLED GDScriptTokenizerBuffer(); }; diff --git a/servers/physics/collision_object_sw.h b/servers/physics/collision_object_sw.h index 6e6b66dac2..5c14d5aaf9 100644 --- a/servers/physics/collision_object_sw.h +++ b/servers/physics/collision_object_sw.h @@ -130,7 +130,7 @@ public: _FORCE_INLINE_ const Transform &get_shape_transform(int p_index) const { return shapes[p_index].xform; } _FORCE_INLINE_ const Transform &get_shape_inv_transform(int p_index) const { return shapes[p_index].xform_inv; } _FORCE_INLINE_ const AABB &get_shape_aabb(int p_index) const { return shapes[p_index].aabb_cache; } - _FORCE_INLINE_ const real_t get_shape_area(int p_index) const { return shapes[p_index].area_cache; } + _FORCE_INLINE_ real_t get_shape_area(int p_index) const { return shapes[p_index].area_cache; } _FORCE_INLINE_ Transform get_transform() const { return transform; } _FORCE_INLINE_ Transform get_inv_transform() const { return inv_transform; } |