You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The main data structure ant::TEvent and ant::TEventData use std::unique_ptr and std::shared_ptr for the rather complex inter-event data dependencies (for example, particles point to their candidate they were made of, etc.). However, the const-ness of the TEvent given to physics classes does not apply to the objects managed as shared_ptr. So users can change events in physics classes, and influencing other physics classes unknowingly. That's a huge design flaw...
Likewise, the ant::Tree structure is also not const correctly implemented.
Creating some cc_shared_ptr which transfers its own constness to the managed object could be a nice solution. But implementation is far from being trivial (see branch cc_shared).
The text was updated successfully, but these errors were encountered:
The main data structure
ant::TEvent
andant::TEventData
usestd::unique_ptr
andstd::shared_ptr
for the rather complex inter-event data dependencies (for example, particles point to their candidate they were made of, etc.). However, theconst
-ness of the TEvent given to physics classes does not apply to the objects managed asshared_ptr
. So users can change events in physics classes, and influencing other physics classes unknowingly. That's a huge design flaw...Likewise, the ant::Tree structure is also not const correctly implemented.
Creating some cc_shared_ptr which transfers its own constness to the managed object could be a nice solution. But implementation is far from being trivial (see branch cc_shared).
The text was updated successfully, but these errors were encountered: