mirror of
https://github.com/kiwix/java-libkiwix.git
synced 2025-09-16 02:24:57 -04:00
Fix SuggestionIterator hasNext.
This commit is contained in:
parent
f561034ba8
commit
8323333c44
@ -42,13 +42,13 @@ METHOD0(void, dispose)
|
|||||||
} CATCH_EXCEPTION()
|
} CATCH_EXCEPTION()
|
||||||
|
|
||||||
METHOD0(jboolean, hasNext) {
|
METHOD0(jboolean, hasNext) {
|
||||||
NATIVE_TYPE next(*THIS);
|
// THIS is the next item to return. So we have to check it with end
|
||||||
next++;
|
|
||||||
auto end = getPtr<NATIVE_TYPE>(env, thisObj, "nativeHandleEnd");
|
auto end = getPtr<NATIVE_TYPE>(env, thisObj, "nativeHandleEnd");
|
||||||
return next == *end;
|
return *THIS != *end;
|
||||||
} CATCH_EXCEPTION(false)
|
} CATCH_EXCEPTION(false)
|
||||||
|
|
||||||
METHOD0(jobject, next) {
|
METHOD0(jobject, next) {
|
||||||
|
|
||||||
zim::SuggestionItem item = **THIS;
|
zim::SuggestionItem item = **THIS;
|
||||||
(*THIS)++;
|
(*THIS)++;
|
||||||
return BUILD_WRAPPER("org/kiwix/libzim/SuggestionItem", item);
|
return BUILD_WRAPPER("org/kiwix/libzim/SuggestionItem", item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user