am f2a6f2db
: Merge "Fix: using wrong method to call ArrayList.add."
* commit 'f2a6f2db3e77587f952c5628bd1e4223d7b26b64': Fix: using wrong method to call ArrayList.add.
This commit is contained in:
commit
c5a953da21
1 changed files with 4 additions and 4 deletions
|
@ -42,7 +42,7 @@ void WordProperty::outputProperties(JNIEnv *const env, jintArray outCodePoints,
|
||||||
jintArray bigramWord1CodePointArray = env->NewIntArray(word1CodePoints->size());
|
jintArray bigramWord1CodePointArray = env->NewIntArray(word1CodePoints->size());
|
||||||
env->SetIntArrayRegion(bigramWord1CodePointArray, 0 /* start */,
|
env->SetIntArrayRegion(bigramWord1CodePointArray, 0 /* start */,
|
||||||
word1CodePoints->size(), &word1CodePoints->at(0));
|
word1CodePoints->size(), &word1CodePoints->at(0));
|
||||||
env->CallVoidMethod(outBigramTargets, addMethodId, bigramWord1CodePointArray);
|
env->CallBooleanMethod(outBigramTargets, addMethodId, bigramWord1CodePointArray);
|
||||||
env->DeleteLocalRef(bigramWord1CodePointArray);
|
env->DeleteLocalRef(bigramWord1CodePointArray);
|
||||||
|
|
||||||
int bigramProbabilityInfo[] = {bigramProperty->getProbability(),
|
int bigramProbabilityInfo[] = {bigramProperty->getProbability(),
|
||||||
|
@ -51,7 +51,7 @@ void WordProperty::outputProperties(JNIEnv *const env, jintArray outCodePoints,
|
||||||
jintArray bigramProbabilityInfoArray = env->NewIntArray(NELEMS(bigramProbabilityInfo));
|
jintArray bigramProbabilityInfoArray = env->NewIntArray(NELEMS(bigramProbabilityInfo));
|
||||||
env->SetIntArrayRegion(bigramProbabilityInfoArray, 0 /* start */,
|
env->SetIntArrayRegion(bigramProbabilityInfoArray, 0 /* start */,
|
||||||
NELEMS(bigramProbabilityInfo), bigramProbabilityInfo);
|
NELEMS(bigramProbabilityInfo), bigramProbabilityInfo);
|
||||||
env->CallVoidMethod(outBigramProbabilities, addMethodId, bigramProbabilityInfoArray);
|
env->CallBooleanMethod(outBigramProbabilities, addMethodId, bigramProbabilityInfoArray);
|
||||||
env->DeleteLocalRef(bigramProbabilityInfoArray);
|
env->DeleteLocalRef(bigramProbabilityInfoArray);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,11 +62,11 @@ void WordProperty::outputProperties(JNIEnv *const env, jintArray outCodePoints,
|
||||||
jintArray shortcutTargetCodePointArray = env->NewIntArray(targetCodePoints->size());
|
jintArray shortcutTargetCodePointArray = env->NewIntArray(targetCodePoints->size());
|
||||||
env->SetIntArrayRegion(shortcutTargetCodePointArray, 0 /* start */,
|
env->SetIntArrayRegion(shortcutTargetCodePointArray, 0 /* start */,
|
||||||
targetCodePoints->size(), &targetCodePoints->at(0));
|
targetCodePoints->size(), &targetCodePoints->at(0));
|
||||||
env->CallVoidMethod(outShortcutTargets, addMethodId, shortcutTargetCodePointArray);
|
env->CallBooleanMethod(outShortcutTargets, addMethodId, shortcutTargetCodePointArray);
|
||||||
env->DeleteLocalRef(shortcutTargetCodePointArray);
|
env->DeleteLocalRef(shortcutTargetCodePointArray);
|
||||||
jobject integerProbability = env->NewObject(integerClass, intToIntegerConstructorId,
|
jobject integerProbability = env->NewObject(integerClass, intToIntegerConstructorId,
|
||||||
mShortcuts[i].getProbability());
|
mShortcuts[i].getProbability());
|
||||||
env->CallVoidMethod(outShortcutProbabilities, addMethodId, integerProbability);
|
env->CallBooleanMethod(outShortcutProbabilities, addMethodId, integerProbability);
|
||||||
env->DeleteLocalRef(integerProbability);
|
env->DeleteLocalRef(integerProbability);
|
||||||
}
|
}
|
||||||
env->DeleteLocalRef(integerClass);
|
env->DeleteLocalRef(integerClass);
|
||||||
|
|
Loading…
Reference in a new issue