Commit 64fb18b8 authored by Jacob Potter's avatar Jacob Potter

Qualify PointerType conversion operator so that it only works on lvalues.

parent 51d6f433
...@@ -91,10 +91,11 @@ public: ...@@ -91,10 +91,11 @@ public:
explicit LocalRef(PointerType localRef) explicit LocalRef(PointerType localRef)
: std::unique_ptr<typename std::remove_pointer<PointerType>::type, LocalRefDeleter>( : std::unique_ptr<typename std::remove_pointer<PointerType>::type, LocalRefDeleter>(
localRef) {} localRef) {}
// Allow implicit conversion to PointerType so it can be passed // Allow implicit conversion to PointerType so it can be passed
// as argument to JNI functions expecting PointerType. // as argument to JNI functions expecting PointerType.
// All functions creating new local references should return LocalRef instead of PointerType // All functions creating new local references should return LocalRef instead of PointerType
operator PointerType() const { return this->get(); } operator PointerType() const & { return this->get(); }
operator PointerType() && = delete;
}; };
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment