mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-11 21:27:01 -04:00
Use smart pointer
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user