-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
Could we remove const from the returned EVENT::LCObject*? I.e. change
| std::tuple<float, const EVENT::LCObject*> getRelatedToMaxWeightAndObject(EVENT::LCObject* from, DecodeF&& decode = identity ) const{ |
| const EVENT::LCObject* getRelatedToMaxWeightObject(EVENT::LCObject* from, DecodeF&& decode = identity ) const{ |
| const EVENT::LCObject* getRelatedFromMaxWeightObject(EVENT::LCObject* to, DecodeF&& decode = identity ) const{ |
to
std::tuple<float, EVENT::LCObject*> getRelatedToMaxWeightAndObject(EVENT::LCObject* from, DecodeF&& decode = identity ) const{
EVENT::LCObject* getRelatedToMaxWeightObject(EVENT::LCObject* from, DecodeF&& decode = identity ) const{
EVENT::LCObject* getRelatedFromMaxWeightObject(EVENT::LCObject* to, DecodeF&& decode = identity ) const{
Before these methods one previously used getRelatedToObjects() / getRelatedFromObjects() which returned const std::vector<EVENT::LCObject*>. Objects were not const.
Could we keep things consistent with the previous usage and keep it non-const?
Otherwise, I have to change my all functions to using e.g const MCParticle* instead of MCParticle* or copy object behind the pointer...
EVENT::LCCollection::getElementAt() gets objects from collection also without const.
And we have impl classes with setters, so const is somewhat redundant here if I am not missing anything...
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels