mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 21:06:59 -04:00
Instead of the new_intrusive<T>() functions, use intrusive(new T)
This means we no longer need 8 different functions for different numbers of arguments, and non-const references can now also be passed to constructors without problems. git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1443 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -398,7 +398,7 @@ ControlPointRemoveAction::ControlPointRemoveAction(const SymbolShapeP& shape, co
|
||||
FOR_EACH(point, shape->points) {
|
||||
if (to_delete.find(point) != to_delete.end()) {
|
||||
// remove this point
|
||||
removals.push_back(new_intrusive2<SinglePointRemoveAction>(shape, index));
|
||||
removals.push_back(intrusive(new SinglePointRemoveAction(shape, index)));
|
||||
}
|
||||
++index;
|
||||
}
|
||||
@@ -422,7 +422,7 @@ void ControlPointRemoveAction::perform(bool to_undo) {
|
||||
Action* control_point_remove_action(const SymbolShapeP& shape, const set<ControlPointP>& to_delete) {
|
||||
if (shape->points.size() - to_delete.size() < 2) {
|
||||
// TODO : remove part?
|
||||
//new_intrusive<ControlPointRemoveAllAction>(part);
|
||||
//intrusive(new ControlPointRemoveAllAction(part));
|
||||
return 0; // no action
|
||||
} else {
|
||||
return new ControlPointRemoveAction(shape, to_delete);
|
||||
|
||||
Reference in New Issue
Block a user