Fix compilation warnings about unused vars
parent
aba8766618
commit
2559c70e27
|
@ -45,8 +45,8 @@ public:
|
||||||
Name *instance = godot::as<Name>(script->new_()); \
|
Name *instance = godot::as<Name>(script->new_()); \
|
||||||
return instance; \
|
return instance; \
|
||||||
} \
|
} \
|
||||||
inline static size_t ___get_id() { return typeid(Name).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 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 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)); } \
|
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
|
// instance and destroy funcs
|
||||||
|
|
||||||
template <class T>
|
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();
|
T *d = new T();
|
||||||
d->_owner = p;
|
d->_owner = p;
|
||||||
d->_type_tag = typeid(T).hash_code();
|
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>
|
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;
|
T *d = (T *)data;
|
||||||
delete d;
|
delete d;
|
||||||
}
|
}
|
||||||
|
@ -145,12 +145,12 @@ void register_tool_class() {
|
||||||
typedef godot_variant (*__godot_wrapper_method)(godot_object *, void *, void *, int, godot_variant **);
|
typedef godot_variant (*__godot_wrapper_method)(godot_object *, void *, void *, int, godot_variant **);
|
||||||
|
|
||||||
template <class T, class R, class... args>
|
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();
|
return T::___get_type_name();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T, class R, class... args>
|
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();
|
return T::___get_type_name();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -189,13 +189,13 @@ struct _WrappedMethod<T, void, As...> {
|
||||||
void (T::*f)(As...);
|
void (T::*f)(As...);
|
||||||
|
|
||||||
template <int... I>
|
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])...);
|
(obj->*f)(_ArgCast<As>::_arg_cast(*args[I])...);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
template <class T, class R, class... As>
|
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_variant v;
|
||||||
godot::api->godot_variant_new_nil(&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>
|
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...>;
|
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>
|
template <class T, class P>
|
||||||
struct _PropertySetFunc {
|
struct _PropertySetFunc {
|
||||||
void (T::*f)(P);
|
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;
|
_PropertySetFunc<T, P> *set_func = (_PropertySetFunc<T, P> *)method_data;
|
||||||
T *obj = (T *)user_data;
|
T *obj = (T *)user_data;
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ template <class T, class P>
|
||||||
struct _PropertyGetFunc {
|
struct _PropertyGetFunc {
|
||||||
P(T::*f)
|
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;
|
_PropertyGetFunc<T, P> *get_func = (_PropertyGetFunc<T, P> *)method_data;
|
||||||
T *obj = (T *)user_data;
|
T *obj = (T *)user_data;
|
||||||
|
|
||||||
|
@ -281,7 +281,7 @@ struct _PropertyGetFunc {
|
||||||
template <class T, class P>
|
template <class T, class P>
|
||||||
struct _PropertyDefaultSetFunc {
|
struct _PropertyDefaultSetFunc {
|
||||||
P(T::*f);
|
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;
|
_PropertyDefaultSetFunc<T, P> *set_func = (_PropertyDefaultSetFunc<T, P> *)method_data;
|
||||||
T *obj = (T *)user_data;
|
T *obj = (T *)user_data;
|
||||||
|
|
||||||
|
@ -294,7 +294,7 @@ struct _PropertyDefaultSetFunc {
|
||||||
template <class T, class P>
|
template <class T, class P>
|
||||||
struct _PropertyDefaultGetFunc {
|
struct _PropertyDefaultGetFunc {
|
||||||
P(T::*f);
|
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;
|
_PropertyDefaultGetFunc<T, P> *get_func = (_PropertyDefaultGetFunc<T, P> *)method_data;
|
||||||
T *obj = (T *)user_data;
|
T *obj = (T *)user_data;
|
||||||
|
|
||||||
|
|
|
@ -134,7 +134,7 @@ void String::operator+=(const String &s) {
|
||||||
_godot_string = godot::api->godot_string_operator_plus(&_godot_string, &s._godot_string);
|
_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
|
// @Todo
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -475,19 +475,19 @@ float String::similarity(String text) const {
|
||||||
return godot::api->godot_string_similarity(&_godot_string, &text._godot_string);
|
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);
|
godot_array arr = godot::api->godot_string_split(&_godot_string, &divisor._godot_string);
|
||||||
|
|
||||||
return *(Array *)&arr;
|
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);
|
godot_array arr = godot::api->godot_string_split_floats(&_godot_string, &divisor._godot_string);
|
||||||
|
|
||||||
return *(Array *)&arr;
|
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);
|
godot_array arr = godot::api->godot_string_split_floats(&_godot_string, &divisor._godot_string);
|
||||||
|
|
||||||
return *(Array *)&arr;
|
return *(Array *)&arr;
|
||||||
|
|
Loading…
Reference in New Issue