java/Ref: remove const, add default initialiser

This commit is contained in:
Max Kellermann 2021-03-28 13:08:40 +02:00 committed by Max Kellermann
parent 296ec4d07c
commit 16d187b7ed

View File

@ -43,10 +43,12 @@ namespace Java {
*/
template<typename T>
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.