mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +00:00
Iterator.validate_iterator_state to avoid crashes using next() and get()
Just to avoid accidental crashes using .get() / .next() when using them from Python - in cases when iterator was initialized but there were no elements or if iterator got exhausted.
This commit is contained in:
@@ -122,6 +122,7 @@ namespace IfcGeom {
|
||||
|
||||
std::mutex element_ready_mutex_;
|
||||
bool task_result_ptr_initialized = false;
|
||||
bool task_result_ptr_exhausted = false;
|
||||
size_t async_elements_returned_ = 0;
|
||||
|
||||
ifcopenshell::geometry::Settings settings_;
|
||||
@@ -207,6 +208,7 @@ namespace IfcGeom {
|
||||
bool wait_for_element();
|
||||
|
||||
void log_timepoints() const;
|
||||
void validate_iterator_state() const;
|
||||
|
||||
ifcopenshell::geometry::taxonomy::direction3::ptr remove_offset_();
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user