diff options
Diffstat (limited to 'platform/android/java_class_wrapper.cpp')
-rw-r--r-- | platform/android/java_class_wrapper.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/platform/android/java_class_wrapper.cpp b/platform/android/java_class_wrapper.cpp index 13550c4b11..6b9105b8e5 100644 --- a/platform/android/java_class_wrapper.cpp +++ b/platform/android/java_class_wrapper.cpp @@ -40,7 +40,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, JNIEnv *env = ThreadAndroid::get_env(); - MethodInfo *method = NULL; + MethodInfo *method = nullptr; for (List<MethodInfo>::Element *E = M->get().front(); E; E = E->next()) { if (!p_instance && !E->get()._static) { @@ -160,7 +160,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, r_error.error = Callable::CallError::CALL_OK; - jvalue *argv = NULL; + jvalue *argv = nullptr; if (method->param_types.size()) { @@ -173,7 +173,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, switch (method->param_types[i]) { case ARG_TYPE_VOID: { //can't happen - argv[i].l = NULL; //I hope this works + argv[i].l = nullptr; //I hope this works } break; case ARG_TYPE_BOOLEAN: { @@ -285,7 +285,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, argv[i].l = jo->instance; } else { - argv[i].l = NULL; //I hope this works + argv[i].l = nullptr; //I hope this works } } break; @@ -386,7 +386,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, case ARG_ARRAY_BIT | ARG_TYPE_STRING: { Array arr = *p_args[i]; - jobjectArray a = env->NewObjectArray(arr.size(), env->FindClass("java/lang/String"), NULL); + jobjectArray a = env->NewObjectArray(arr.size(), env->FindClass("java/lang/String"), nullptr); for (int j = 0; j < arr.size(); j++) { String s = arr[j]; @@ -400,7 +400,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, } break; case ARG_ARRAY_BIT | ARG_TYPE_CLASS: { - argv[i].l = NULL; + argv[i].l = nullptr; } break; } } @@ -520,7 +520,7 @@ bool JavaClass::_call_method(JavaObject *p_instance, const StringName &p_method, Variant JavaClass::call(const StringName &p_method, const Variant **p_args, int p_argcount, Callable::CallError &r_error) { Variant ret; - bool found = _call_method(NULL, p_method, p_args, p_argcount, r_error, ret); + bool found = _call_method(nullptr, p_method, p_args, p_argcount, r_error, ret); if (found) { return ret; } @@ -1205,7 +1205,7 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) { int mods = env->CallIntMethod(obj, Field_getModifiers); if ((mods & 0x8) && (mods & 0x10) && (mods & 0x1)) { //static final public! - jobject objc = env->CallObjectMethod(obj, Field_get, NULL); + jobject objc = env->CallObjectMethod(obj, Field_get, nullptr); if (objc) { uint32_t sig; @@ -1236,7 +1236,7 @@ Ref<JavaClass> JavaClassWrapper::wrap(const String &p_class) { return Ref<JavaClass>(); } -JavaClassWrapper *JavaClassWrapper::singleton = NULL; +JavaClassWrapper *JavaClassWrapper::singleton = nullptr; JavaClassWrapper::JavaClassWrapper(jobject p_activity) { |