summaryrefslogtreecommitdiff
path: root/libs/samba/src/main/cpp/jni.hpp
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2024-11-05 22:49:58 +0100
committerJoel Klinghed <the_jk@spawned.biz>2024-11-05 23:32:17 +0100
commit30c48c66b8fdc523b4fa3bf9649a4fb45dde0e67 (patch)
treebfa8c85be5a29275596208ff8b6bc661dfdbf948 /libs/samba/src/main/cpp/jni.hpp
parent57936035e7b3f415a726ae5de5bc834d334f1624 (diff)
Style cleanup
Remove unused parameter names, extra colons, code that is never executed and an opinionated detekt check.
Diffstat (limited to 'libs/samba/src/main/cpp/jni.hpp')
-rw-r--r--libs/samba/src/main/cpp/jni.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/samba/src/main/cpp/jni.hpp b/libs/samba/src/main/cpp/jni.hpp
index aa79bbe..55b7752 100644
--- a/libs/samba/src/main/cpp/jni.hpp
+++ b/libs/samba/src/main/cpp/jni.hpp
@@ -24,7 +24,7 @@ template<class T>
class Ref {
public:
constexpr Ref() : ptr_(nullptr) {}
- constexpr Ref(std::nullptr_t) : ptr_(nullptr) {}
+ constexpr Ref(std::nullptr_t) : ptr_(nullptr) {} // NOLINT
Ref(const Ref<T>&) = delete;
[[nodiscard]] T get() const { return ptr_; }
@@ -62,7 +62,7 @@ template<class T>
class LocalRef : public Ref<T> {
public:
constexpr LocalRef(): Ref<T>() {}
- constexpr LocalRef(std::nullptr_t): Ref<T>() {}
+ constexpr LocalRef(std::nullptr_t): Ref<T>() {} // NOLINT
LocalRef(JNIEnv* env, T ptr): Ref<T>(env, ptr) {}
~LocalRef() override { free(); }
@@ -109,7 +109,7 @@ template<class T>
class GlobalRef : public Ref<T> {
public:
constexpr GlobalRef() : Ref<T>() {}
- constexpr GlobalRef(std::nullptr_t) : Ref<T>() {}
+ constexpr GlobalRef(std::nullptr_t) : Ref<T>() {} // NOLINT
GlobalRef(JNIEnv* env, T ptr) : Ref<T>() {
if (ptr) {
if (!env)
@@ -117,7 +117,7 @@ class GlobalRef : public Ref<T> {
this->ptr_ = static_cast<T>(env->NewGlobalRef(static_cast<jobject>(ptr)));
}
}
- GlobalRef(const Ref<T>& other) : Ref<T>() {
+ GlobalRef(const Ref<T>& other) : Ref<T>() { // NOLINT
if (other) {
auto* env = AttachCurrentThread();
this->ptr_ = static_cast<T>(env->NewGlobalRef(static_cast<jobject>(other.get())));