mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 11:23:43 +00:00
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:
@@ -629,7 +629,7 @@ int main () {
|
|||||||
}
|
}
|
||||||
case NEXT: {
|
case NEXT: {
|
||||||
Next n; n.read(std::cin);
|
Next n; n.read(std::cin);
|
||||||
has_more = iterator->next() != 0;
|
has_more = static_cast<bool>(iterator->next());
|
||||||
if (!has_more) {
|
if (!has_more) {
|
||||||
delete file;
|
delete file;
|
||||||
delete iterator;
|
delete iterator;
|
||||||
|
|||||||
Reference in New Issue
Block a user