mirror of
https://github.com/godotengine/godot.git
synced 2024-11-22 04:06:14 +00:00
Merge pull request #26132 from marxin/fix-Wignored-qualifiers
Fix warnings seen with -Wignored-qualifiers.
This commit is contained in:
commit
726f31e992
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -167,7 +167,7 @@ public:
|
||||
|
||||
KinematicShape() :
|
||||
shape(NULL) {}
|
||||
const bool is_active() const { return shape; }
|
||||
bool is_active() const { return shape; }
|
||||
};
|
||||
|
||||
struct KinematicUtilities {
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
};
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user