Skip to content

Commit ecf9550

Browse files
committed
Eliminate an annoying parameter to Array::New
1 parent 84a73da commit ecf9550

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

include/jni/array.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,9 +154,9 @@ namespace jni
154154
SetObjectArrayElement(env, SafeDereference(env, array), index, Untag(value));
155155
}
156156

157-
static Array<Object<TheTag>> New(JNIEnv& env, jsize length, const Class<TheTag>& clazz, const Object<TheTag>& initialElement = Object<TheTag>())
157+
static Array<Object<TheTag>> New(JNIEnv& env, jsize length, const Object<TheTag>& initialElement = Object<TheTag>())
158158
{
159-
return Array<Object<TheTag>>(&NewObjectArray(env, length, clazz, initialElement.Get()));
159+
return Array<Object<TheTag>>(&NewObjectArray(env, length, Class<TheTag>::Singleton(env), initialElement.Get()));
160160
}
161161

162162
Global<Array<Object<TheTag>>> NewGlobalRef(JNIEnv& env) const

0 commit comments

Comments
 (0)