[REDMINE1D-159] [RM-7008] [refactor] CLineModelElementList m_Elements Created: 13/Jun/23  Updated: 24/Aug/23

Status: Open
Project: 1D Redmine
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Normal
Reporter: Redmine-Jira Migtation Assignee: Redmine-Jira Migtation
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Created on 2022-01-24 15:07:58 by Didier Vibert. % Done: 0

m_Elements is a vector of shared_ptr to CLineModelElement

the pointer is useless here, it could simply be a vector of CLineModelElement.

The getter (operator[]) can just return the CLineModelElement by ref (may need a cons getter as well).
The setter is the CLineModelElementList::push_back function which is always called with a new CLineModelElement allocation : it can thus be called with a CLineModelElement rvalue ref that can be moved inside.



 Comments   
Comment by Redmine-Jira Migtation [ 24/Aug/23 ]

Comment by Didier Vibert on 2022-09-01 15:20:33:
maybe try to declare CLineModelElementList as a derived std::vector<CLineModelElement>

(and suppress the operator[] and maybe other redefined methods)

Generated at Sat Feb 10 15:29:52 JST 2024 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.