diff --git a/src/app/commands/cmd_about.cpp b/src/app/commands/cmd_about.cpp index c0f4a8a53..ba49c4775 100644 --- a/src/app/commands/cmd_about.cpp +++ b/src/app/commands/cmd_about.cpp @@ -32,7 +32,7 @@ using namespace ui; class AboutCommand : public Command { public: AboutCommand(); - Command* clone() const { return new AboutCommand(*this); } + Command* clone() const OVERRIDE { return new AboutCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_advanced_mode.cpp b/src/app/commands/cmd_advanced_mode.cpp index d05639ad4..57a964727 100644 --- a/src/app/commands/cmd_advanced_mode.cpp +++ b/src/app/commands/cmd_advanced_mode.cpp @@ -38,7 +38,7 @@ using namespace ui; class AdvancedModeCommand : public Command { public: AdvancedModeCommand(); - Command* clone() const { return new AdvancedModeCommand(*this); } + Command* clone() const OVERRIDE { return new AdvancedModeCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_background_from_layer.cpp b/src/app/commands/cmd_background_from_layer.cpp index a0a57385b..e304fbcb6 100644 --- a/src/app/commands/cmd_background_from_layer.cpp +++ b/src/app/commands/cmd_background_from_layer.cpp @@ -37,7 +37,7 @@ namespace app { class BackgroundFromLayerCommand : public Command { public: BackgroundFromLayerCommand(); - Command* clone() const { return new BackgroundFromLayerCommand(*this); } + Command* clone() const OVERRIDE { return new BackgroundFromLayerCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_cancel.cpp b/src/app/commands/cmd_cancel.cpp index 454a4a634..89f8ee70a 100644 --- a/src/app/commands/cmd_cancel.cpp +++ b/src/app/commands/cmd_cancel.cpp @@ -24,13 +24,14 @@ #include "app/commands/commands.h" #include "app/context.h" +#include "base/compiler_specific.h" namespace app { class CancelCommand : public Command { public: CancelCommand(); - Command* clone() { return new CancelCommand(*this); } + Command* clone() const OVERRIDE { return new CancelCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_canvas_size.cpp b/src/app/commands/cmd_canvas_size.cpp index 84033bebf..c50fb87e0 100644 --- a/src/app/commands/cmd_canvas_size.cpp +++ b/src/app/commands/cmd_canvas_size.cpp @@ -149,7 +149,7 @@ class CanvasSizeCommand : public Command { public: CanvasSizeCommand(); - Command* clone() const { return new CanvasSizeCommand(*this); } + Command* clone() const OVERRIDE { return new CanvasSizeCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_cel_properties.cpp b/src/app/commands/cmd_cel_properties.cpp index a80a311cb..96f4ddf75 100644 --- a/src/app/commands/cmd_cel_properties.cpp +++ b/src/app/commands/cmd_cel_properties.cpp @@ -45,7 +45,7 @@ using namespace ui; class CelPropertiesCommand : public Command { public: CelPropertiesCommand(); - Command* clone() const { return new CelPropertiesCommand(*this); } + Command* clone() const OVERRIDE { return new CelPropertiesCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_change_image_type.cpp b/src/app/commands/cmd_change_image_type.cpp index e5dd00915..f8ac8ef9d 100644 --- a/src/app/commands/cmd_change_image_type.cpp +++ b/src/app/commands/cmd_change_image_type.cpp @@ -41,7 +41,7 @@ class ChangePixelFormatCommand : public Command { DitheringMethod m_dithering; public: ChangePixelFormatCommand(); - Command* clone() const { return new ChangePixelFormatCommand(*this); } + Command* clone() const OVERRIDE { return new ChangePixelFormatCommand(*this); } protected: void onLoadParams(Params* params); diff --git a/src/app/commands/cmd_clear.cpp b/src/app/commands/cmd_clear.cpp index bec13ef1f..e4084dd3a 100644 --- a/src/app/commands/cmd_clear.cpp +++ b/src/app/commands/cmd_clear.cpp @@ -40,7 +40,7 @@ namespace app { class ClearCommand : public Command { public: ClearCommand(); - Command* clone() const { return new ClearCommand(*this); } + Command* clone() const OVERRIDE { return new ClearCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_close_file.cpp b/src/app/commands/cmd_close_file.cpp index b44a2d03b..994b9fa7b 100644 --- a/src/app/commands/cmd_close_file.cpp +++ b/src/app/commands/cmd_close_file.cpp @@ -52,7 +52,7 @@ public: { } - Command* clone() const { return new CloseFileCommand(*this); } + Command* clone() const OVERRIDE { return new CloseFileCommand(*this); } protected: @@ -99,7 +99,7 @@ public: { } - Command* clone() const { return new CloseAllFilesCommand(*this); } + Command* clone() const OVERRIDE { return new CloseAllFilesCommand(*this); } protected: diff --git a/src/app/commands/cmd_configure_tools.cpp b/src/app/commands/cmd_configure_tools.cpp index 12ca05531..56cb50625 100644 --- a/src/app/commands/cmd_configure_tools.cpp +++ b/src/app/commands/cmd_configure_tools.cpp @@ -60,7 +60,7 @@ static void on_exit_delete_this_widget() class ConfigureTools : public Command { public: ConfigureTools(); - Command* clone() const { return new ConfigureTools(*this); } + Command* clone() const OVERRIDE { return new ConfigureTools(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_copy.cpp b/src/app/commands/cmd_copy.cpp index d53b8a1f0..a06066c23 100644 --- a/src/app/commands/cmd_copy.cpp +++ b/src/app/commands/cmd_copy.cpp @@ -34,7 +34,7 @@ namespace app { class CopyCommand : public Command { public: CopyCommand(); - Command* clone() const { return new CopyCommand(*this); } + Command* clone() const OVERRIDE { return new CopyCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_copy_cel.cpp b/src/app/commands/cmd_copy_cel.cpp index 4f5c59fd8..3d02ffb53 100644 --- a/src/app/commands/cmd_copy_cel.cpp +++ b/src/app/commands/cmd_copy_cel.cpp @@ -33,7 +33,7 @@ namespace app { class CopyCelCommand : public Command { public: CopyCelCommand(); - Command* clone() const { return new CopyCelCommand(*this); } + Command* clone() const OVERRIDE { return new CopyCelCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_crop.cpp b/src/app/commands/cmd_crop.cpp index 690012791..7df619076 100644 --- a/src/app/commands/cmd_crop.cpp +++ b/src/app/commands/cmd_crop.cpp @@ -40,7 +40,7 @@ namespace app { class CropSpriteCommand : public Command { public: CropSpriteCommand(); - Command* clone() const { return new CropSpriteCommand(*this); } + Command* clone() const OVERRIDE { return new CropSpriteCommand(*this); } protected: bool onEnabled(Context* context); @@ -81,7 +81,7 @@ void CropSpriteCommand::onExecute(Context* context) class AutocropSpriteCommand : public Command { public: AutocropSpriteCommand(); - Command* clone() const { return new AutocropSpriteCommand(*this); } + Command* clone() const OVERRIDE { return new AutocropSpriteCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_cut.cpp b/src/app/commands/cmd_cut.cpp index af481c92e..bdbc769e4 100644 --- a/src/app/commands/cmd_cut.cpp +++ b/src/app/commands/cmd_cut.cpp @@ -34,7 +34,7 @@ namespace app { class CutCommand : public Command { public: CutCommand(); - Command* clone() const { return new CutCommand(*this); } + Command* clone() const OVERRIDE { return new CutCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_deselect_mask.cpp b/src/app/commands/cmd_deselect_mask.cpp index 26ccf836c..a57d8e99f 100644 --- a/src/app/commands/cmd_deselect_mask.cpp +++ b/src/app/commands/cmd_deselect_mask.cpp @@ -33,7 +33,7 @@ namespace app { class DeselectMaskCommand : public Command { public: DeselectMaskCommand(); - Command* clone() const { return new DeselectMaskCommand(*this); } + Command* clone() const OVERRIDE { return new DeselectMaskCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_duplicate_layer.cpp b/src/app/commands/cmd_duplicate_layer.cpp index 762c28b9b..4faf22d56 100644 --- a/src/app/commands/cmd_duplicate_layer.cpp +++ b/src/app/commands/cmd_duplicate_layer.cpp @@ -41,7 +41,7 @@ namespace app { class DuplicateLayerCommand : public Command { public: DuplicateLayerCommand(); - Command* clone() const { return new DuplicateLayerCommand(*this); } + Command* clone() const OVERRIDE { return new DuplicateLayerCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_duplicate_sprite.cpp b/src/app/commands/cmd_duplicate_sprite.cpp index 701d9fec3..076371d6e 100644 --- a/src/app/commands/cmd_duplicate_sprite.cpp +++ b/src/app/commands/cmd_duplicate_sprite.cpp @@ -41,7 +41,7 @@ using namespace ui; class DuplicateSpriteCommand : public Command { public: DuplicateSpriteCommand(); - Command* clone() { return new DuplicateSpriteCommand(*this); } + Command* clone() const OVERRIDE { return new DuplicateSpriteCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_exit.cpp b/src/app/commands/cmd_exit.cpp index 86f8bd915..c92c491c7 100644 --- a/src/app/commands/cmd_exit.cpp +++ b/src/app/commands/cmd_exit.cpp @@ -32,7 +32,7 @@ namespace app { class ExitCommand : public Command { public: ExitCommand(); - Command* clone() { return new ExitCommand(*this); } + Command* clone() const OVERRIDE { return new ExitCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_eyedropper.cpp b/src/app/commands/cmd_eyedropper.cpp index 01488b9a3..516cc7311 100644 --- a/src/app/commands/cmd_eyedropper.cpp +++ b/src/app/commands/cmd_eyedropper.cpp @@ -50,7 +50,7 @@ class EyedropperCommand : public Command { public: EyedropperCommand(); - Command* clone() const { return new EyedropperCommand(*this); } + Command* clone() const OVERRIDE { return new EyedropperCommand(*this); } protected: void onLoadParams(Params* params); diff --git a/src/app/commands/cmd_flatten_layers.cpp b/src/app/commands/cmd_flatten_layers.cpp index 8998bfbf5..bac1d163b 100644 --- a/src/app/commands/cmd_flatten_layers.cpp +++ b/src/app/commands/cmd_flatten_layers.cpp @@ -35,7 +35,7 @@ namespace app { class FlattenLayersCommand : public Command { public: FlattenLayersCommand(); - Command* clone() { return new FlattenLayersCommand(*this); } + Command* clone() const OVERRIDE { return new FlattenLayersCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_flip.h b/src/app/commands/cmd_flip.h index 64172783d..d15bde8d2 100644 --- a/src/app/commands/cmd_flip.h +++ b/src/app/commands/cmd_flip.h @@ -20,6 +20,7 @@ #define APP_COMMANDS_CMD_FLIP_H_INCLUDED #include "app/commands/command.h" +#include "base/compiler_specific.h" #include "raster/algorithm/flip_type.h" namespace app { @@ -27,7 +28,7 @@ namespace app { class FlipCommand : public Command { public: FlipCommand(); - Command* clone() const { return new FlipCommand(*this); } + Command* clone() const OVERRIDE { return new FlipCommand(*this); } raster::algorithm::FlipType getFlipType() const { return m_flipType; } diff --git a/src/app/commands/cmd_frame_properties.cpp b/src/app/commands/cmd_frame_properties.cpp index 33559a4ec..0481bed93 100644 --- a/src/app/commands/cmd_frame_properties.cpp +++ b/src/app/commands/cmd_frame_properties.cpp @@ -41,7 +41,7 @@ using namespace ui; class FramePropertiesCommand : public Command { public: FramePropertiesCommand(); - Command* clone() { return new FramePropertiesCommand(*this); } + Command* clone() const OVERRIDE { return new FramePropertiesCommand(*this); } protected: void onLoadParams(Params* params); diff --git a/src/app/commands/cmd_goto_frame.cpp b/src/app/commands/cmd_goto_frame.cpp index 4a7edb6f0..e3f12eb76 100644 --- a/src/app/commands/cmd_goto_frame.cpp +++ b/src/app/commands/cmd_goto_frame.cpp @@ -62,7 +62,7 @@ public: GotoFirstFrameCommand() : GotoCommand("GotoFirstFrame", "Goto First Frame") { } - Command* clone() { return new GotoFirstFrameCommand(*this); } + Command* clone() const OVERRIDE { return new GotoFirstFrameCommand(*this); } protected: FrameNumber onGetFrame(Editor* editor) OVERRIDE { @@ -79,7 +79,7 @@ public: GotoPreviousFrameCommand() : GotoCommand("GotoPreviousFrame", "Goto Previous Frame") { } - Command* clone() { return new GotoPreviousFrameCommand(*this); } + Command* clone() const OVERRIDE { return new GotoPreviousFrameCommand(*this); } protected: FrameNumber onGetFrame(Editor* editor) OVERRIDE { @@ -100,7 +100,7 @@ class GotoNextFrameCommand : public GotoCommand public: GotoNextFrameCommand() : GotoCommand("GotoNextFrame", "Goto Next Frame") { } - Command* clone() { return new GotoNextFrameCommand(*this); } + Command* clone() const OVERRIDE { return new GotoNextFrameCommand(*this); } protected: FrameNumber onGetFrame(Editor* editor) OVERRIDE { @@ -119,7 +119,7 @@ class GotoLastFrameCommand : public GotoCommand public: GotoLastFrameCommand() : GotoCommand("GotoLastFrame", "Goto Last Frame") { } - Command* clone() { return new GotoLastFrameCommand(*this); } + Command* clone() const OVERRIDE { return new GotoLastFrameCommand(*this); } protected: FrameNumber onGetFrame(Editor* editor) OVERRIDE { @@ -136,7 +136,7 @@ public: GotoFrameCommand() : GotoCommand("GotoFrame", "Goto Frame") , m_frame(0) { } - Command* clone() { return new GotoFrameCommand(*this); } + Command* clone() const OVERRIDE { return new GotoFrameCommand(*this); } protected: void onLoadParams(Params* params) OVERRIDE diff --git a/src/app/commands/cmd_goto_layer.cpp b/src/app/commands/cmd_goto_layer.cpp index b5af2b4c1..e0c0836dd 100644 --- a/src/app/commands/cmd_goto_layer.cpp +++ b/src/app/commands/cmd_goto_layer.cpp @@ -50,7 +50,7 @@ protected: class GotoPreviousLayerCommand : public GotoCommand { public: GotoPreviousLayerCommand(); - Command* clone() { return new GotoPreviousLayerCommand(*this); } + Command* clone() const OVERRIDE { return new GotoPreviousLayerCommand(*this); } protected: bool onEnabled(Context* context); @@ -92,7 +92,7 @@ void GotoPreviousLayerCommand::onExecute(Context* context) class GotoNextLayerCommand : public GotoCommand { public: GotoNextLayerCommand(); - Command* clone() { return new GotoNextLayerCommand(*this); } + Command* clone() const OVERRIDE { return new GotoNextLayerCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_goto_tab.cpp b/src/app/commands/cmd_goto_tab.cpp index 29d2aaabe..1482f0769 100644 --- a/src/app/commands/cmd_goto_tab.cpp +++ b/src/app/commands/cmd_goto_tab.cpp @@ -31,7 +31,7 @@ namespace app { class GotoNextTabCommand : public Command { public: GotoNextTabCommand(); - Command* clone() { return new GotoNextTabCommand(*this); } + Command* clone() const OVERRIDE { return new GotoNextTabCommand(*this); } protected: void onExecute(Context* context); @@ -52,7 +52,7 @@ void GotoNextTabCommand::onExecute(Context* context) class GotoPreviousTabCommand : public Command { public: GotoPreviousTabCommand(); - Command* clone() { return new GotoPreviousTabCommand(*this); } + Command* clone() const OVERRIDE { return new GotoPreviousTabCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_grid.cpp b/src/app/commands/cmd_grid.cpp index 15c5877b1..104628261 100644 --- a/src/app/commands/cmd_grid.cpp +++ b/src/app/commands/cmd_grid.cpp @@ -48,7 +48,7 @@ public: { } - Command* clone() const { return new ShowGridCommand(*this); } + Command* clone() const OVERRIDE { return new ShowGridCommand(*this); } protected: bool onChecked(Context* context) @@ -75,7 +75,7 @@ public: { } - Command* clone() const { return new SnapToGridCommand(*this); } + Command* clone() const OVERRIDE { return new SnapToGridCommand(*this); } protected: bool onChecked(Context* context) @@ -102,7 +102,7 @@ protected: class GridSettingsCommand : public Command { public: GridSettingsCommand(); - Command* clone() const { return new GridSettingsCommand(*this); } + Command* clone() const OVERRIDE { return new GridSettingsCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_import_sprite_sheet.cpp b/src/app/commands/cmd_import_sprite_sheet.cpp index a4cbc9e21..981021cb2 100644 --- a/src/app/commands/cmd_import_sprite_sheet.cpp +++ b/src/app/commands/cmd_import_sprite_sheet.cpp @@ -348,7 +348,7 @@ private: class ImportSpriteSheetCommand : public Command { public: ImportSpriteSheetCommand(); - Command* clone() { return new ImportSpriteSheetCommand(*this); } + Command* clone() const OVERRIDE { return new ImportSpriteSheetCommand(*this); } protected: virtual void onExecute(Context* context) OVERRIDE; diff --git a/src/app/commands/cmd_invert_mask.cpp b/src/app/commands/cmd_invert_mask.cpp index bbad613f6..d95fe7906 100644 --- a/src/app/commands/cmd_invert_mask.cpp +++ b/src/app/commands/cmd_invert_mask.cpp @@ -37,7 +37,7 @@ namespace app { class InvertMaskCommand : public Command { public: InvertMaskCommand(); - Command* clone() { return new InvertMaskCommand(*this); } + Command* clone() const OVERRIDE { return new InvertMaskCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_launch.cpp b/src/app/commands/cmd_launch.cpp index 2832f6fb6..c6241a198 100644 --- a/src/app/commands/cmd_launch.cpp +++ b/src/app/commands/cmd_launch.cpp @@ -32,7 +32,7 @@ namespace app { class LaunchCommand : public Command { public: LaunchCommand(); - Command* clone() const { return new LaunchCommand(*this); } + Command* clone() const OVERRIDE { return new LaunchCommand(*this); } protected: void onLoadParams(Params* params) OVERRIDE; diff --git a/src/app/commands/cmd_layer_from_background.cpp b/src/app/commands/cmd_layer_from_background.cpp index ffa89699e..f9df78306 100644 --- a/src/app/commands/cmd_layer_from_background.cpp +++ b/src/app/commands/cmd_layer_from_background.cpp @@ -34,7 +34,7 @@ namespace app { class LayerFromBackgroundCommand : public Command { public: LayerFromBackgroundCommand(); - Command* clone() { return new LayerFromBackgroundCommand(*this); } + Command* clone() const OVERRIDE { return new LayerFromBackgroundCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_layer_properties.cpp b/src/app/commands/cmd_layer_properties.cpp index e24679f39..3a969b0ba 100644 --- a/src/app/commands/cmd_layer_properties.cpp +++ b/src/app/commands/cmd_layer_properties.cpp @@ -37,7 +37,7 @@ using namespace ui; class LayerPropertiesCommand : public Command { public: LayerPropertiesCommand(); - Command* clone() { return new LayerPropertiesCommand(*this); } + Command* clone() const OVERRIDE { return new LayerPropertiesCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_load_mask.cpp b/src/app/commands/cmd_load_mask.cpp index 3a4b00b29..266582633 100644 --- a/src/app/commands/cmd_load_mask.cpp +++ b/src/app/commands/cmd_load_mask.cpp @@ -39,7 +39,7 @@ class LoadMaskCommand : public Command { public: LoadMaskCommand(); - Command* clone() const { return new LoadMaskCommand(*this); } + Command* clone() const OVERRIDE { return new LoadMaskCommand(*this); } protected: void onLoadParams(Params* params); diff --git a/src/app/commands/cmd_load_palette.cpp b/src/app/commands/cmd_load_palette.cpp index b574af385..f2d790e3f 100644 --- a/src/app/commands/cmd_load_palette.cpp +++ b/src/app/commands/cmd_load_palette.cpp @@ -40,7 +40,7 @@ using namespace ui; class LoadPaletteCommand : public Command { public: LoadPaletteCommand(); - Command* clone() { return new LoadPaletteCommand(*this); } + Command* clone() const OVERRIDE { return new LoadPaletteCommand(*this); } protected: void onExecute(Context* context) OVERRIDE; diff --git a/src/app/commands/cmd_mask_all.cpp b/src/app/commands/cmd_mask_all.cpp index 7b26ad5f9..6b8f6b8e0 100644 --- a/src/app/commands/cmd_mask_all.cpp +++ b/src/app/commands/cmd_mask_all.cpp @@ -33,7 +33,7 @@ namespace app { class MaskAllCommand : public Command { public: MaskAllCommand(); - Command* clone() { return new MaskAllCommand(*this); } + Command* clone() const OVERRIDE { return new MaskAllCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_mask_by_color.cpp b/src/app/commands/cmd_mask_by_color.cpp index 6006a23ff..f6d9df86c 100644 --- a/src/app/commands/cmd_mask_by_color.cpp +++ b/src/app/commands/cmd_mask_by_color.cpp @@ -54,7 +54,7 @@ using namespace ui; class MaskByColorCommand : public Command { public: MaskByColorCommand(); - Command* clone() { return new MaskByColorCommand(*this); } + Command* clone() const OVERRIDE { return new MaskByColorCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_merge_down_layer.cpp b/src/app/commands/cmd_merge_down_layer.cpp index c22b8b392..1b3472b21 100644 --- a/src/app/commands/cmd_merge_down_layer.cpp +++ b/src/app/commands/cmd_merge_down_layer.cpp @@ -46,7 +46,7 @@ namespace app { class MergeDownLayerCommand : public Command { public: MergeDownLayerCommand(); - Command* clone() { return new MergeDownLayerCommand(*this); } + Command* clone() const OVERRIDE { return new MergeDownLayerCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_move_cel.cpp b/src/app/commands/cmd_move_cel.cpp index 0778b5b13..d5eaa0590 100644 --- a/src/app/commands/cmd_move_cel.cpp +++ b/src/app/commands/cmd_move_cel.cpp @@ -33,7 +33,7 @@ namespace app { class MoveCelCommand : public Command { public: MoveCelCommand(); - Command* clone() const { return new MoveCelCommand(*this); } + Command* clone() const OVERRIDE { return new MoveCelCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_new_file.cpp b/src/app/commands/cmd_new_file.cpp index 860c2378a..42bb87367 100644 --- a/src/app/commands/cmd_new_file.cpp +++ b/src/app/commands/cmd_new_file.cpp @@ -55,7 +55,7 @@ namespace app { class NewFileCommand : public Command { public: NewFileCommand(); - Command* clone() { return new NewFileCommand(*this); } + Command* clone() const OVERRIDE { return new NewFileCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_new_frame.cpp b/src/app/commands/cmd_new_frame.cpp index 86687908f..01d27c941 100644 --- a/src/app/commands/cmd_new_frame.cpp +++ b/src/app/commands/cmd_new_frame.cpp @@ -43,7 +43,7 @@ namespace app { class NewFrameCommand : public Command { public: NewFrameCommand(); - Command* clone() { return new NewFrameCommand(*this); } + Command* clone() const OVERRIDE { return new NewFrameCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_new_layer.cpp b/src/app/commands/cmd_new_layer.cpp index c9949918c..a6ccf9e5c 100644 --- a/src/app/commands/cmd_new_layer.cpp +++ b/src/app/commands/cmd_new_layer.cpp @@ -44,7 +44,7 @@ using namespace ui; class NewLayerCommand : public Command { public: NewLayerCommand(); - Command* clone() { return new NewLayerCommand(*this); } + Command* clone() const OVERRIDE { return new NewLayerCommand(*this); } protected: void onLoadParams(Params* params); diff --git a/src/app/commands/cmd_new_layer_set.cpp b/src/app/commands/cmd_new_layer_set.cpp index df91659cf..e0e3c41e2 100644 --- a/src/app/commands/cmd_new_layer_set.cpp +++ b/src/app/commands/cmd_new_layer_set.cpp @@ -41,7 +41,7 @@ using namespace ui; class NewLayerSetCommand : public Command { public: NewLayerSetCommand(); - Command* clone() { return new NewLayerSetCommand(*this); } + Command* clone() const OVERRIDE { return new NewLayerSetCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_open_file.cpp b/src/app/commands/cmd_open_file.cpp index 64948d9b8..4ac03c43d 100644 --- a/src/app/commands/cmd_open_file.cpp +++ b/src/app/commands/cmd_open_file.cpp @@ -48,7 +48,7 @@ namespace app { class OpenFileCommand : public Command { public: OpenFileCommand(); - Command* clone() { return new OpenFileCommand(*this); } + Command* clone() const OVERRIDE { return new OpenFileCommand(*this); } protected: void onLoadParams(Params* params); diff --git a/src/app/commands/cmd_open_in_folder.cpp b/src/app/commands/cmd_open_in_folder.cpp index 06632f4e3..b3ca71163 100644 --- a/src/app/commands/cmd_open_in_folder.cpp +++ b/src/app/commands/cmd_open_in_folder.cpp @@ -32,7 +32,7 @@ namespace app { class OpenInFolderCommand : public Command { public: OpenInFolderCommand(); - Command* clone() { return new OpenInFolderCommand(*this); } + Command* clone() const OVERRIDE { return new OpenInFolderCommand(*this); } protected: bool onEnabled(Context* context) OVERRIDE; diff --git a/src/app/commands/cmd_open_with_app.cpp b/src/app/commands/cmd_open_with_app.cpp index 935103c19..69c4ec5c4 100644 --- a/src/app/commands/cmd_open_with_app.cpp +++ b/src/app/commands/cmd_open_with_app.cpp @@ -32,7 +32,7 @@ namespace app { class OpenWithAppCommand : public Command { public: OpenWithAppCommand(); - Command* clone() { return new OpenWithAppCommand(*this); } + Command* clone() const OVERRIDE { return new OpenWithAppCommand(*this); } protected: bool onEnabled(Context* context) OVERRIDE; diff --git a/src/app/commands/cmd_options.cpp b/src/app/commands/cmd_options.cpp index c44328b12..dc15a5c19 100644 --- a/src/app/commands/cmd_options.cpp +++ b/src/app/commands/cmd_options.cpp @@ -44,7 +44,7 @@ using namespace ui; class OptionsCommand : public Command { public: OptionsCommand(); - Command* clone() { return new OptionsCommand(*this); } + Command* clone() const OVERRIDE { return new OptionsCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_palette_editor.cpp b/src/app/commands/cmd_palette_editor.cpp index 8ac35acc6..7e973264e 100644 --- a/src/app/commands/cmd_palette_editor.cpp +++ b/src/app/commands/cmd_palette_editor.cpp @@ -146,7 +146,7 @@ static PaletteEntryEditor* g_window = NULL; class PaletteEditorCommand : public Command { public: PaletteEditorCommand(); - Command* clone() { return new PaletteEditorCommand(*this); } + Command* clone() const OVERRIDE { return new PaletteEditorCommand(*this); } protected: void onLoadParams(Params* params) OVERRIDE; diff --git a/src/app/commands/cmd_paste.cpp b/src/app/commands/cmd_paste.cpp index f6ac83044..b959da3f6 100644 --- a/src/app/commands/cmd_paste.cpp +++ b/src/app/commands/cmd_paste.cpp @@ -23,6 +23,7 @@ #include "app/commands/command.h" #include "app/context.h" #include "app/util/clipboard.h" +#include "base/compiler_specific.h" #include "raster/layer.h" #include "raster/sprite.h" @@ -31,7 +32,7 @@ namespace app { class PasteCommand : public Command { public: PasteCommand(); - Command* clone() { return new PasteCommand(*this); } + Command* clone() const OVERRIDE { return new PasteCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_play_animation.cpp b/src/app/commands/cmd_play_animation.cpp index 5c13ff14e..7092d64c7 100644 --- a/src/app/commands/cmd_play_animation.cpp +++ b/src/app/commands/cmd_play_animation.cpp @@ -43,7 +43,7 @@ namespace app { class PlayAnimationCommand : public Command { public: PlayAnimationCommand(); - Command* clone() { return new PlayAnimationCommand(*this); } + Command* clone() const OVERRIDE { return new PlayAnimationCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_preview.cpp b/src/app/commands/cmd_preview.cpp index 22379a32a..91c30411f 100644 --- a/src/app/commands/cmd_preview.cpp +++ b/src/app/commands/cmd_preview.cpp @@ -55,7 +55,7 @@ using namespace filters; class PreviewCommand : public Command { public: PreviewCommand(); - Command* clone() { return new PreviewCommand(*this); } + Command* clone() const OVERRIDE { return new PreviewCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_refresh.cpp b/src/app/commands/cmd_refresh.cpp index 6c363ca67..0bcb8420f 100644 --- a/src/app/commands/cmd_refresh.cpp +++ b/src/app/commands/cmd_refresh.cpp @@ -40,7 +40,7 @@ namespace app { class RefreshCommand : public Command { public: RefreshCommand(); - Command* clone() { return new RefreshCommand(*this); } + Command* clone() const OVERRIDE { return new RefreshCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_remove_cel.cpp b/src/app/commands/cmd_remove_cel.cpp index c53119d72..9a2edd464 100644 --- a/src/app/commands/cmd_remove_cel.cpp +++ b/src/app/commands/cmd_remove_cel.cpp @@ -37,7 +37,7 @@ namespace app { class RemoveCelCommand : public Command { public: RemoveCelCommand(); - Command* clone() { return new RemoveCelCommand(*this); } + Command* clone() const OVERRIDE { return new RemoveCelCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_remove_frame.cpp b/src/app/commands/cmd_remove_frame.cpp index eb77a8118..9e499833f 100644 --- a/src/app/commands/cmd_remove_frame.cpp +++ b/src/app/commands/cmd_remove_frame.cpp @@ -36,7 +36,7 @@ namespace app { class RemoveFrameCommand : public Command { public: RemoveFrameCommand(); - Command* clone() { return new RemoveFrameCommand(*this); } + Command* clone() const OVERRIDE { return new RemoveFrameCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_remove_layer.cpp b/src/app/commands/cmd_remove_layer.cpp index 3566262ce..80482c2ea 100644 --- a/src/app/commands/cmd_remove_layer.cpp +++ b/src/app/commands/cmd_remove_layer.cpp @@ -38,7 +38,7 @@ namespace app { class RemoveLayerCommand : public Command { public: RemoveLayerCommand(); - Command* clone() { return new RemoveLayerCommand(*this); } + Command* clone() const OVERRIDE { return new RemoveLayerCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_repeat_last_export.cpp b/src/app/commands/cmd_repeat_last_export.cpp index e65f7d65e..d2d27fd07 100644 --- a/src/app/commands/cmd_repeat_last_export.cpp +++ b/src/app/commands/cmd_repeat_last_export.cpp @@ -33,7 +33,7 @@ namespace app { class RepeatLastExportCommand : public Command { public: RepeatLastExportCommand(); - Command* clone() { return new RepeatLastExportCommand(*this); } + Command* clone() const OVERRIDE { return new RepeatLastExportCommand(*this); } protected: virtual bool onEnabled(Context* context) OVERRIDE; diff --git a/src/app/commands/cmd_reselect_mask.cpp b/src/app/commands/cmd_reselect_mask.cpp index e588b6d25..b8f9f1a48 100644 --- a/src/app/commands/cmd_reselect_mask.cpp +++ b/src/app/commands/cmd_reselect_mask.cpp @@ -33,7 +33,7 @@ namespace app { class ReselectMaskCommand : public Command { public: ReselectMaskCommand(); - Command* clone() { return new ReselectMaskCommand(*this); } + Command* clone() const OVERRIDE { return new ReselectMaskCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_rotate_canvas.cpp b/src/app/commands/cmd_rotate_canvas.cpp index 87148db7f..5d53aab26 100644 --- a/src/app/commands/cmd_rotate_canvas.cpp +++ b/src/app/commands/cmd_rotate_canvas.cpp @@ -45,7 +45,7 @@ class RotateCanvasCommand : public Command { public: RotateCanvasCommand(); - Command* clone() { return new RotateCanvasCommand(*this); } + Command* clone() const OVERRIDE { return new RotateCanvasCommand(*this); } protected: void onLoadParams(Params* params); diff --git a/src/app/commands/cmd_save_file.cpp b/src/app/commands/cmd_save_file.cpp index e51f87035..96fc154c8 100644 --- a/src/app/commands/cmd_save_file.cpp +++ b/src/app/commands/cmd_save_file.cpp @@ -207,7 +207,7 @@ protected: class SaveFileCommand : public SaveFileBaseCommand { public: SaveFileCommand(); - Command* clone() { return new SaveFileCommand(*this); } + Command* clone() const OVERRIDE { return new SaveFileCommand(*this); } protected: void onExecute(Context* context); @@ -248,7 +248,7 @@ void SaveFileCommand::onExecute(Context* context) class SaveFileAsCommand : public SaveFileBaseCommand { public: SaveFileAsCommand(); - Command* clone() { return new SaveFileAsCommand(*this); } + Command* clone() const OVERRIDE { return new SaveFileAsCommand(*this); } protected: void onExecute(Context* context); @@ -268,7 +268,7 @@ void SaveFileAsCommand::onExecute(Context* context) class SaveFileCopyAsCommand : public SaveFileBaseCommand { public: SaveFileCopyAsCommand(); - Command* clone() { return new SaveFileCopyAsCommand(*this); } + Command* clone() const OVERRIDE { return new SaveFileCopyAsCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_save_mask.cpp b/src/app/commands/cmd_save_mask.cpp index 2f0160a8a..e7aab43e5 100644 --- a/src/app/commands/cmd_save_mask.cpp +++ b/src/app/commands/cmd_save_mask.cpp @@ -35,7 +35,7 @@ namespace app { class SaveMaskCommand : public Command { public: SaveMaskCommand(); - Command* clone() { return new SaveMaskCommand(*this); } + Command* clone() const OVERRIDE { return new SaveMaskCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_save_palette.cpp b/src/app/commands/cmd_save_palette.cpp index 85f051f98..b374bb1a2 100644 --- a/src/app/commands/cmd_save_palette.cpp +++ b/src/app/commands/cmd_save_palette.cpp @@ -36,7 +36,7 @@ using namespace ui; class SavePaletteCommand : public Command { public: SavePaletteCommand(); - Command* clone() { return new SavePaletteCommand(*this); } + Command* clone() const OVERRIDE { return new SavePaletteCommand(*this); } protected: void onExecute(Context* context) OVERRIDE; diff --git a/src/app/commands/cmd_scroll.cpp b/src/app/commands/cmd_scroll.cpp index 263917b20..b49f5491b 100644 --- a/src/app/commands/cmd_scroll.cpp +++ b/src/app/commands/cmd_scroll.cpp @@ -46,7 +46,7 @@ public: }; ScrollCommand(); - Command* clone() { return new ScrollCommand(*this); } + Command* clone() const OVERRIDE { return new ScrollCommand(*this); } protected: void onLoadParams(Params* params); diff --git a/src/app/commands/cmd_sprite_editor.cpp b/src/app/commands/cmd_sprite_editor.cpp index d11a8bf7c..3f714d697 100644 --- a/src/app/commands/cmd_sprite_editor.cpp +++ b/src/app/commands/cmd_sprite_editor.cpp @@ -31,7 +31,7 @@ namespace app { class MakeUniqueEditorCommand : public Command { public: MakeUniqueEditorCommand(); - Command* clone() { return new MakeUniqueEditorCommand(*this); } + Command* clone() const OVERRIDE { return new MakeUniqueEditorCommand(*this); } protected: void onExecute(Context* context); @@ -54,7 +54,7 @@ void MakeUniqueEditorCommand::onExecute(Context* context) class SplitEditorHorizontallyCommand : public Command { public: SplitEditorHorizontallyCommand(); - Command* clone() { return new SplitEditorHorizontallyCommand(*this); } + Command* clone() const OVERRIDE { return new SplitEditorHorizontallyCommand(*this); } protected: void onExecute(Context* context); @@ -77,7 +77,7 @@ void SplitEditorHorizontallyCommand::onExecute(Context* context) class SplitEditorVerticallyCommand : public Command { public: SplitEditorVerticallyCommand(); - Command* clone() { return new SplitEditorVerticallyCommand(*this); } + Command* clone() const OVERRIDE { return new SplitEditorVerticallyCommand(*this); } protected: void onExecute(Context* context); diff --git a/src/app/commands/cmd_sprite_properties.cpp b/src/app/commands/cmd_sprite_properties.cpp index 33d60118c..6f6500b99 100644 --- a/src/app/commands/cmd_sprite_properties.cpp +++ b/src/app/commands/cmd_sprite_properties.cpp @@ -44,7 +44,7 @@ using namespace ui; class SpritePropertiesCommand : public Command { public: SpritePropertiesCommand(); - Command* clone() { return new SpritePropertiesCommand(*this); } + Command* clone() const OVERRIDE { return new SpritePropertiesCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_sprite_size.cpp b/src/app/commands/cmd_sprite_size.cpp index 0f2ec10bf..694f941eb 100644 --- a/src/app/commands/cmd_sprite_size.cpp +++ b/src/app/commands/cmd_sprite_size.cpp @@ -162,7 +162,7 @@ protected: class SpriteSizeCommand : public Command { public: SpriteSizeCommand(); - Command* clone() { return new SpriteSizeCommand(*this); } + Command* clone() const OVERRIDE { return new SpriteSizeCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/cmd_timeline.cpp b/src/app/commands/cmd_timeline.cpp index a90cecc52..d4e504855 100644 --- a/src/app/commands/cmd_timeline.cpp +++ b/src/app/commands/cmd_timeline.cpp @@ -34,7 +34,7 @@ namespace app { class TimelineCommand : public Command { public: TimelineCommand(); - Command* clone() { return new TimelineCommand(*this); } + Command* clone() const OVERRIDE { return new TimelineCommand(*this); } protected: void onLoadParams(Params* params) OVERRIDE; diff --git a/src/app/commands/cmd_undo.cpp b/src/app/commands/cmd_undo.cpp index e55e71037..687223b86 100644 --- a/src/app/commands/cmd_undo.cpp +++ b/src/app/commands/cmd_undo.cpp @@ -40,7 +40,7 @@ public: enum Type { Undo, Redo }; UndoCommand(Type type); - Command* clone() { return new UndoCommand(*this); } + Command* clone() const OVERRIDE { return new UndoCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/filters/cmd_color_curve.cpp b/src/app/commands/filters/cmd_color_curve.cpp index 91c21d384..bae19130e 100644 --- a/src/app/commands/filters/cmd_color_curve.cpp +++ b/src/app/commands/filters/cmd_color_curve.cpp @@ -89,7 +89,7 @@ private: class ColorCurveCommand : public Command { public: ColorCurveCommand(); - Command* clone() const { return new ColorCurveCommand(*this); } + Command* clone() const OVERRIDE { return new ColorCurveCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/filters/cmd_convolution_matrix.cpp b/src/app/commands/filters/cmd_convolution_matrix.cpp index 3d7169387..338c4332b 100644 --- a/src/app/commands/filters/cmd_convolution_matrix.cpp +++ b/src/app/commands/filters/cmd_convolution_matrix.cpp @@ -156,7 +156,7 @@ private: class ConvolutionMatrixCommand : public Command { public: ConvolutionMatrixCommand(); - Command* clone() const { return new ConvolutionMatrixCommand(*this); } + Command* clone() const OVERRIDE { return new ConvolutionMatrixCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/filters/cmd_despeckle.cpp b/src/app/commands/filters/cmd_despeckle.cpp index ae9a1f7c1..05abedb9b 100644 --- a/src/app/commands/filters/cmd_despeckle.cpp +++ b/src/app/commands/filters/cmd_despeckle.cpp @@ -94,7 +94,7 @@ class DespeckleCommand : public Command { public: DespeckleCommand(); - Command* clone() const { return new DespeckleCommand(*this); } + Command* clone() const OVERRIDE { return new DespeckleCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/filters/cmd_invert_color.cpp b/src/app/commands/filters/cmd_invert_color.cpp index a5dac6db8..87bff6dde 100644 --- a/src/app/commands/filters/cmd_invert_color.cpp +++ b/src/app/commands/filters/cmd_invert_color.cpp @@ -60,7 +60,7 @@ private: class InvertColorCommand : public Command { public: InvertColorCommand(); - Command* clone() const { return new InvertColorCommand(*this); } + Command* clone() const OVERRIDE { return new InvertColorCommand(*this); } protected: bool onEnabled(Context* context); diff --git a/src/app/commands/filters/cmd_replace_color.cpp b/src/app/commands/filters/cmd_replace_color.cpp index aab47bb70..fb4d6e9dc 100644 --- a/src/app/commands/filters/cmd_replace_color.cpp +++ b/src/app/commands/filters/cmd_replace_color.cpp @@ -121,7 +121,7 @@ private: class ReplaceColorCommand : public Command { public: ReplaceColorCommand(); - Command* clone() const { return new ReplaceColorCommand(*this); } + Command* clone() const OVERRIDE { return new ReplaceColorCommand(*this); } protected: bool onEnabled(Context* context);