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