summaryrefslogtreecommitdiffstats
path: root/include/jau/jni/jni_mem.hpp
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2020-10-20 05:46:28 +0200
committerSven Gothel <[email protected]>2020-10-20 05:46:28 +0200
commite431d2b869d7ef71de51ce352671a6f2aba31e2a (patch)
tree3b1c3fae573c649927478c0f1d8c63504241be60 /include/jau/jni/jni_mem.hpp
parent8e603953e960eb683c7fa00c9cf9fc39ab890c85 (diff)
Use -Wshadow: Shadowing (or local scope override) often causing sloppy bugs, avoid.
Diffstat (limited to 'include/jau/jni/jni_mem.hpp')
-rw-r--r--include/jau/jni/jni_mem.hpp18
1 files changed, 9 insertions, 9 deletions
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;
}