Use smart pointer

This commit is contained in:
Twan van Laarhoven
2020-05-31 16:16:34 +02:00
parent 1f75175943
commit e9305c7554
4 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -116,6 +116,6 @@ void SymbolValueEditor::editSymbol() {
wnd->Show();
}
ValueActionPerformer* SymbolValueEditor::getActionPerformer() {
return new ValueActionPerformer(valueP(), editor().getCard(), editor().getSetForActions());
unique_ptr<ValueActionPerformer> SymbolValueEditor::getActionPerformer() {
return make_unique<ValueActionPerformer>(valueP(), editor().getCard(), editor().getSetForActions());
}
+1 -1
View File
@@ -35,7 +35,7 @@ private:
/// Show the symbol editor
void editSymbol();
/// Get an object to perform actions for us
ValueActionPerformer* getActionPerformer();
unique_ptr<ValueActionPerformer> getActionPerformer();
// button, or -1 for mouse down, but not on button, or -2 for mouse not down
int button_down;