Commit 49a1d617 authored by Adrien Béraud's avatar Adrien Béraud

jni: reserve size for type conversion

Change-Id: I9dfa4ea09f34f4cb78820e1bcc5f6e9e3999b91b
parent 79df3f43
......@@ -148,7 +148,7 @@ namespace std {
%typemap(javacode) vector< map<string,string> > %{
public java.util.ArrayList<java.util.Map<String, String>> toNative() {
java.util.ArrayList<java.util.Map<String, String>> out = new java.util.ArrayList<>();
java.util.ArrayList<java.util.Map<String, String>> out = new java.util.ArrayList<>(size());
for (int i = 0; i < size(); ++i) {
out.add(get(i).toNative());
}
......
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