Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ShapeContainer::ShapeContainer( const ShapeContainer & other ){
- for(int i=0; i<(int)other.m_vect.size(); i++){
- m_vect.push_back(other.m_vect[i]->clone());
- }
- auto begin = other.m_vect.begin();
- auto end = other.m_vect.end();
- std::transform(begin, end, std::back_inserter(m_vect), [](ShapePtr const& p)
- { return p.clone(); });
- for(auto&& p: other.m_vect) {
- m_vect.push_back(p.clone();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment