From 16d187b7edf7ca81ac70769fa4043ce4425f3675 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 28 Mar 2021 13:08:40 +0200 Subject: [PATCH] java/Ref: remove `const`, add default initialiser --- src/java/Ref.hxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/java/Ref.hxx b/src/java/Ref.hxx index bd62b17d7..e19ebb930 100644 --- a/src/java/Ref.hxx +++ b/src/java/Ref.hxx @@ -43,10 +43,12 @@ namespace Java { */ template class LocalRef { - JNIEnv *const env; - const T value; + JNIEnv *env; + T value = nullptr; public: + LocalRef() noexcept = default; + /** * The local reference is obtained by the caller. May * be nullptr.