diff options
author | Sven Gothel <[email protected]> | 2020-10-20 05:46:28 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2020-10-20 05:46:28 +0200 |
commit | e431d2b869d7ef71de51ce352671a6f2aba31e2a (patch) | |
tree | 3b1c3fae573c649927478c0f1d8c63504241be60 /include/jau | |
parent | 8e603953e960eb683c7fa00c9cf9fc39ab890c85 (diff) |
Use -Wshadow: Shadowing (or local scope override) often causing sloppy bugs, avoid.
Diffstat (limited to 'include/jau')
-rw-r--r-- | include/jau/function_def.hpp | 8 | ||||
-rw-r--r-- | include/jau/jni/helper_jni.hpp | 4 | ||||
-rw-r--r-- | include/jau/jni/jni_mem.hpp | 18 |
3 files changed, 15 insertions, 15 deletions
diff --git a/include/jau/function_def.hpp b/include/jau/function_def.hpp index d5242af..d1184c3 100644 --- a/include/jau/function_def.hpp +++ b/include/jau/function_def.hpp @@ -221,13 +221,13 @@ namespace jau { public: /** Utilizes copy-ctor from 'const I& _data' */ - CaptureInvocationFunc(const I& _data, R(*_function)(I&, A...), bool dataIsIdentity) noexcept - : data(_data), function(_function), dataIsIdentity(dataIsIdentity) { + CaptureInvocationFunc(const I& _data, R(*_function)(I&, A...), bool dataIsIdentity_) noexcept + : data(_data), function(_function), dataIsIdentity(dataIsIdentity_) { } /** Utilizes move-ctor from moved 'I&& _data' */ - CaptureInvocationFunc(I&& _data, R(*_function)(I&, A...), bool dataIsIdentity) noexcept - : data(std::move(_data)), function(_function), dataIsIdentity(dataIsIdentity) { + CaptureInvocationFunc(I&& _data, R(*_function)(I&, A...), bool dataIsIdentity_) noexcept + : data(std::move(_data)), function(_function), dataIsIdentity(dataIsIdentity_) { } int getType() const noexcept override { return 3; } diff --git a/include/jau/jni/helper_jni.hpp b/include/jau/jni/helper_jni.hpp index 582f355..c8a7393 100644 --- a/include/jau/jni/helper_jni.hpp +++ b/include/jau/jni/helper_jni.hpp @@ -159,8 +159,8 @@ namespace jau { } return true; } - JavaGlobalObj(jobject obj, jmethodID mNotifyDeleted) noexcept - : javaObjectRef(obj), mNotifyDeleted(mNotifyDeleted) { } + JavaGlobalObj(jobject obj, jmethodID mNotifyDeleted_) noexcept + : javaObjectRef(obj), mNotifyDeleted(mNotifyDeleted_) { } JavaGlobalObj(const JavaGlobalObj &o) noexcept = default; JavaGlobalObj(JavaGlobalObj &&o) noexcept = default; diff --git a/include/jau/jni/jni_mem.hpp b/include/jau/jni/jni_mem.hpp index 1bf2f7c..12ee82e 100644 --- a/include/jau/jni/jni_mem.hpp +++ b/include/jau/jni/jni_mem.hpp @@ -144,7 +144,7 @@ private: jboolean isCopy = false; public: - JNICriticalArray(JNIEnv *env) : env(env) {} + JNICriticalArray(JNIEnv *env_val) : env(env_val) {} JNICriticalArray(const JNICriticalArray &o) = delete; JNICriticalArray(JNICriticalArray &&o) = delete; @@ -174,16 +174,16 @@ public: /** * Acquired the primitive array. */ - T* get(U jarray, Mode mode=UPDATE_AND_RELEASE) { - if( nullptr == jarray ) { + T* get(U jarray_val, Mode mode_val=UPDATE_AND_RELEASE) { + if( nullptr == jarray_val ) { return nullptr; } - T* narray = static_cast<T*>( env->GetPrimitiveArrayCritical(jarray, &isCopy) ); - if( nullptr != narray ) { - this->mode = mode; - this->jarray = jarray; - this->narray = narray; - return narray; + T* _narray = static_cast<T*>( env->GetPrimitiveArrayCritical(jarray_val, &isCopy) ); + if( nullptr != _narray ) { + this->mode = mode_val; + this->jarray = jarray_val; + this->narray = _narray; + return _narray; } return nullptr; } |