diff options
| author | Mika Pi <mika+github@mika.global> | 2020-02-22 18:13:37 -0800 |
|---|---|---|
| committer | Mika Pi <mika+github@mika.global> | 2020-02-23 07:40:54 -0800 |
| commit | 2559c70e274f9239cd29c434ab262c46f6dc8552 (patch) | |
| tree | e922a89b545935c0e9b86c5078c04e93a0a2907a /include/core | |
| parent | aba8766618c6aa40c6f7b40b513e8e47cfa807f4 (diff) | |
| download | redot-cpp-2559c70e274f9239cd29c434ab262c46f6dc8552.tar.gz | |
Fix compilation warnings about unused vars
Diffstat (limited to 'include/core')
| -rw-r--r-- | include/core/Godot.hpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/include/core/Godot.hpp b/include/core/Godot.hpp index 4789632..8983e00 100644 --- a/include/core/Godot.hpp +++ b/include/core/Godot.hpp @@ -45,8 +45,8 @@ public: Name *instance = godot::as<Name>(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<Name>(godot::Object::___get_from_variant(a)); } \ \ @@ -96,7 +96,7 @@ struct _ArgCast<Variant> { // instance and destroy funcs template <class T> -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 <class T> -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 <class T, class R, class... args> -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 <class T, class R, class... args> -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<T, void, As...> { void (T::*f)(As...); template <int... I> - void apply(Variant *ret, T *obj, Variant **args, __Sequence<I...>) { + void apply(Variant * /*ret*/, T *obj, Variant **args, __Sequence<I...>) { (obj->*f)(_ArgCast<As>::_arg_cast(*args[I])...); } }; template <class T, class R, class... As> -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 <class T, class R, class... As> -__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<T, R, As...>; } @@ -249,7 +249,7 @@ void register_method(const char *name, M method_ptr, godot_method_rpc_mode rpc_t template <class T, class P> 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<T, P> *set_func = (_PropertySetFunc<T, P> *)method_data; T *obj = (T *)user_data; @@ -263,7 +263,7 @@ template <class T, class P> 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<T, P> *get_func = (_PropertyGetFunc<T, P> *)method_data; T *obj = (T *)user_data; @@ -281,7 +281,7 @@ struct _PropertyGetFunc { template <class T, class P> 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<T, P> *set_func = (_PropertyDefaultSetFunc<T, P> *)method_data; T *obj = (T *)user_data; @@ -294,7 +294,7 @@ struct _PropertyDefaultSetFunc { template <class T, class P> 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<T, P> *get_func = (_PropertyDefaultGetFunc<T, P> *)method_data; T *obj = (T *)user_data; |
