ifcgeomserver: test iterator->next() via operator bool (fix ambiguous !=)

Iterator::next() now returns express::Base (data-model branch). Comparing
it against 0 is ambiguous: 0 converts to Base via the pointer ctor while
Base converts to int via operator bool, so both operator!=(int,int) and
Base::operator!= are candidates. Use an explicit truthiness test — an
empty Base signals end-of-iteration.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Dion Moult
2026-07-09 23:28:41 +10:00
parent 1684513109
commit b3f83f67ca
+1 -1
View File
@@ -629,7 +629,7 @@ int main () {
}
case NEXT: {
Next n; n.read(std::cin);
has_more = iterator->next() != 0;
has_more = static_cast<bool>(iterator->next());
if (!has_more) {
delete file;
delete iterator;