diff options
author | Sven Gothel <[email protected]> | 2022-11-27 17:23:45 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-11-27 17:23:45 +0100 |
commit | 9160f9a4b74f5e5ae07f715025ea4d3aafdf6ab3 (patch) | |
tree | d193d3a6b75d081d21d2091f44d7547eb0d9e9e3 /java_jni/jni/jau | |
parent | 2ec818d6c5cb8bebde5845827c9f0939506efc6e (diff) |
clang-tidy: Add 'performance-' fixes
- Drop 'std::move' for trivially copyable things
- Use 'const T&' if not moved into and used as R value only
- Notable: Can also hold a default value!
- Use non-const local vars, if used as return or move value
Diffstat (limited to 'java_jni/jni/jau')
-rw-r--r-- | java_jni/jni/jau/UnixDynamicLinkerImpl_JNI.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/java_jni/jni/jau/UnixDynamicLinkerImpl_JNI.cxx b/java_jni/jni/jau/UnixDynamicLinkerImpl_JNI.cxx index 4ee1938..db8aca3 100644 --- a/java_jni/jni/jau/UnixDynamicLinkerImpl_JNI.cxx +++ b/java_jni/jni/jau/UnixDynamicLinkerImpl_JNI.cxx @@ -42,7 +42,7 @@ Java_jau_sys_dl_UnixDynamicLinkerImpl_dlclose(JNIEnv *env, jclass _unused, jlong (void)env; (void)_unused; - return dlclose((void *)(intptr_t)arg0); + return dlclose((void *)(intptr_t)arg0); // NOLINT(performance-no-int-to-ptr) } /* @@ -115,7 +115,7 @@ Java_jau_sys_dl_UnixDynamicLinkerImpl_dlsym(JNIEnv *env, jclass _unused, jlong a if (arg1 != nullptr) { const char * _UTF8arg1 = env->GetStringUTFChars(arg1, (jboolean *)nullptr); if (_UTF8arg1 != nullptr) { - const void *_res = dlsym((void *)(intptr_t)arg0, (char *)_UTF8arg1); + const void *_res = dlsym((void *)(intptr_t)arg0, (char *)_UTF8arg1); // NOLINT(performance-no-int-to-ptr) DBG_PRINT("XXX dlsym: handle %p, symbol %s -> %p\n", (void *)(intptr_t)arg0, _UTF8arg1, _res); env->ReleaseStringUTFChars(arg1, _UTF8arg1); return (jlong)(intptr_t)_res; |