Commit 2d95ac2e authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

Java/String: inherit the super class constructor

parent f58c14a7
......@@ -45,6 +45,8 @@ class File : public LocalObject {
static jmethodID getAbsolutePath_method;
public:
using LocalObject::LocalObject;
gcc_nonnull_all
static void Initialise(JNIEnv *env) noexcept;
......
......@@ -44,8 +44,7 @@ namespace Java {
*/
class String : public LocalRef<jstring> {
public:
String(JNIEnv *env, jstring value) noexcept
:LocalRef<jstring>(env, value) {}
using LocalRef::LocalRef;
String(JNIEnv *_env, const char *_value) noexcept
:LocalRef<jstring>(_env, _env->NewStringUTF(_value)) {}
......
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