diff --git a/include/core/Godot.hpp b/include/core/Godot.hpp index 47896328..8983e00e 100644 --- a/include/core/Godot.hpp +++ b/include/core/Godot.hpp @@ -45,8 +45,8 @@ public: Name *instance = godot::as(script->new_()); \ return instance; \ } \ - inline static size_t ___get_id() { return typeid(Name).hash_code(); } \ - inline static size_t ___get_base_id() { return typeid(Base).hash_code(); } \ + inline static size_t ___get_id() { return typeid(Name).hash_code(); } \ + inline static size_t ___get_base_id() { return typeid(Base).hash_code(); } \ inline static const char *___get_base_type_name() { return Base::___get_class_name(); } \ inline static Object *___get_from_variant(godot::Variant a) { return (godot::Object *)godot::as(godot::Object::___get_from_variant(a)); } \ \ @@ -96,7 +96,7 @@ struct _ArgCast { // instance and destroy funcs template -void *_godot_class_instance_func(godot_object *p, void *method_data) { +void *_godot_class_instance_func(godot_object *p, void * /*method_data*/) { T *d = new T(); d->_owner = p; d->_type_tag = typeid(T).hash_code(); @@ -105,7 +105,7 @@ void *_godot_class_instance_func(godot_object *p, void *method_data) { } template -void _godot_class_destroy_func(godot_object *p, void *method_data, void *data) { +void _godot_class_destroy_func(godot_object * /*p*/, void * /*method_data*/, void *data) { T *d = (T *)data; delete d; } @@ -145,12 +145,12 @@ void register_tool_class() { typedef godot_variant (*__godot_wrapper_method)(godot_object *, void *, void *, int, godot_variant **); template -const char *___get_method_class_name(R (T::*p)(args... a)) { +const char *___get_method_class_name(R (T::* /*p*/)(args... a)) { return T::___get_type_name(); } template -const char *___get_method_class_name(R (T::*p)(args... a) const) { +const char *___get_method_class_name(R (T::* /*p*/)(args... a) const) { return T::___get_type_name(); } @@ -189,13 +189,13 @@ struct _WrappedMethod { void (T::*f)(As...); template - void apply(Variant *ret, T *obj, Variant **args, __Sequence) { + void apply(Variant * /*ret*/, T *obj, Variant **args, __Sequence) { (obj->*f)(_ArgCast::_arg_cast(*args[I])...); } }; template -godot_variant __wrapped_method(godot_object *, void *method_data, void *user_data, int num_args, godot_variant **args) { +godot_variant __wrapped_method(godot_object *, void *method_data, void *user_data, int /*num_args*/, godot_variant **args) { godot_variant v; godot::api->godot_variant_new_nil(&v); @@ -219,7 +219,7 @@ void *___make_wrapper_function(R (T::*f)(As...)) { } template -__godot_wrapper_method ___get_wrapper_function(R (T::*f)(As...)) { +__godot_wrapper_method ___get_wrapper_function(R (T::* /*f*/)(As...)) { return (__godot_wrapper_method)&__wrapped_method; } @@ -249,7 +249,7 @@ void register_method(const char *name, M method_ptr, godot_method_rpc_mode rpc_t template struct _PropertySetFunc { void (T::*f)(P); - static void _wrapped_setter(godot_object *object, void *method_data, void *user_data, godot_variant *value) { + static void _wrapped_setter(godot_object * /*object*/, void *method_data, void *user_data, godot_variant *value) { _PropertySetFunc *set_func = (_PropertySetFunc *)method_data; T *obj = (T *)user_data; @@ -263,7 +263,7 @@ template struct _PropertyGetFunc { P(T::*f) (); - static godot_variant _wrapped_getter(godot_object *object, void *method_data, void *user_data) { + static godot_variant _wrapped_getter(godot_object * /*object*/, void *method_data, void *user_data) { _PropertyGetFunc *get_func = (_PropertyGetFunc *)method_data; T *obj = (T *)user_data; @@ -281,7 +281,7 @@ struct _PropertyGetFunc { template struct _PropertyDefaultSetFunc { P(T::*f); - static void _wrapped_setter(godot_object *object, void *method_data, void *user_data, godot_variant *value) { + static void _wrapped_setter(godot_object * /*object*/, void *method_data, void *user_data, godot_variant *value) { _PropertyDefaultSetFunc *set_func = (_PropertyDefaultSetFunc *)method_data; T *obj = (T *)user_data; @@ -294,7 +294,7 @@ struct _PropertyDefaultSetFunc { template struct _PropertyDefaultGetFunc { P(T::*f); - static godot_variant _wrapped_getter(godot_object *object, void *method_data, void *user_data) { + static godot_variant _wrapped_getter(godot_object * /*object*/, void *method_data, void *user_data) { _PropertyDefaultGetFunc *get_func = (_PropertyDefaultGetFunc *)method_data; T *obj = (T *)user_data; diff --git a/src/core/String.cpp b/src/core/String.cpp index 7340b6d6..c97d1317 100644 --- a/src/core/String.cpp +++ b/src/core/String.cpp @@ -134,7 +134,7 @@ void String::operator+=(const String &s) { _godot_string = godot::api->godot_string_operator_plus(&_godot_string, &s._godot_string); } -void String::operator+=(const wchar_t c) { +void String::operator+=(const wchar_t /*c*/) { // @Todo } @@ -475,19 +475,19 @@ float String::similarity(String text) const { return godot::api->godot_string_similarity(&_godot_string, &text._godot_string); } -PoolStringArray String::split(String divisor, bool allow_empty) const { +PoolStringArray String::split(String divisor, bool /*allow_empty*/) const { godot_array arr = godot::api->godot_string_split(&_godot_string, &divisor._godot_string); return *(Array *)&arr; } -PoolIntArray String::split_ints(String divisor, bool allow_empty) const { +PoolIntArray String::split_ints(String divisor, bool /*allow_empty*/) const { godot_array arr = godot::api->godot_string_split_floats(&_godot_string, &divisor._godot_string); return *(Array *)&arr; } -PoolRealArray String::split_floats(String divisor, bool allow_empty) const { +PoolRealArray String::split_floats(String divisor, bool /*allow_empty*/) const { godot_array arr = godot::api->godot_string_split_floats(&_godot_string, &divisor._godot_string); return *(Array *)&arr;