diff options
author | Max Kellermann <max.kellermann@gmail.com> | 2021-03-28 13:24:00 +0200 |
---|---|---|
committer | Max Kellermann <max@musicpd.org> | 2021-04-06 13:29:24 +0200 |
commit | 2d95ac2e94ac0d5a70bd073a862d3cbad694946a (patch) | |
tree | b5b87a97912e52110428242e37a59caafdff30cd /src | |
parent | f58c14a74a08a20fdabdd91a0dfdc7a302799980 (diff) |
Java/String: inherit the super class constructor
Diffstat (limited to 'src')
-rw-r--r-- | src/java/File.hxx | 2 | ||||
-rw-r--r-- | 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<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)) {} |