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:
twanvl
2010-07-21 14:32:28 +00:00
parent 8800500d86
commit 51dfed69b4
66 changed files with 304 additions and 353 deletions
+2 -2
View File
@@ -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);