From 2d95ac2e94ac0d5a70bd073a862d3cbad694946a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sun, 28 Mar 2021 13:24:00 +0200 Subject: [PATCH] Java/String: inherit the super class constructor --- src/java/File.hxx | 2 ++ src/java/String.hxx | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/java/File.hxx b/src/java/File.hxx index a805cdad5..e7a1a5363 100644 --- a/src/java/File.hxx +++ b/src/java/File.hxx @@ -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; diff --git a/src/java/String.hxx b/src/java/String.hxx index 3e6e682a4..715cf647b 100644 --- a/src/java/String.hxx +++ b/src/java/String.hxx @@ -44,8 +44,7 @@ namespace Java { */ class String : public LocalRef { public: - String(JNIEnv *env, jstring value) noexcept - :LocalRef(env, value) {} + using LocalRef::LocalRef; String(JNIEnv *_env, const char *_value) noexcept :LocalRef(_env, _env->NewStringUTF(_value)) {}