Merge pull request #373 from John-Colvin/patch-1

missing std.conv : to import
This commit is contained in:
Adam D. Ruppe 2023-03-05 07:40:16 -05:00 committed by GitHub
commit a2d1f0c689
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

1
jni.d
View File

@ -1951,6 +1951,7 @@ auto DDatumToJni(T)(JNIEnv* env, T data) {
(*env).SetByteArrayRegion(env, j, 0, cast(jsize) data.length, data.ptr); (*env).SetByteArrayRegion(env, j, 0, cast(jsize) data.length, data.ptr);
return j; return j;
} else static if(is(T == wchar[])) { } else static if(is(T == wchar[])) {
import std.conv : to;
return DDatumToJni(env, to!string(data)); // FIXME: could prolly be more efficient return DDatumToJni(env, to!string(data)); // FIXME: could prolly be more efficient
} else static if(is(T == short[])) { } else static if(is(T == short[])) {
auto j = (*env).NewShortArray(env, cast(jsize) data.length); auto j = (*env).NewShortArray(env, cast(jsize) data.length);