aseprite/src/undo/undo_command.h
David Capello 8adbae888f Fix deleting UndoCommand instances from stack in undo_tests
This bug was introduced in e730b9095870bd09c5d2330982e1abf9bb02e422
to fix memory leaks in "app". Now a new UndoCommand::dispose() member
function was added to fix this problem.

Also std::function<> and std::tr1::function<> was removed from the test.
We're in the middle of a transition between OS X SDK 10.4 to 10.9/10
and this brings some problems.
2015-05-29 10:03:20 -03:00

24 lines
494 B
C++

// Aseprite Undo Library
// Copyright (C) 2015 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef UNDO_UNDO_COMMAND_H_INCLUDED
#define UNDO_UNDO_COMMAND_H_INCLUDED
#pragma once
namespace undo {
class UndoCommand {
public:
virtual ~UndoCommand() { }
virtual void undo() = 0;
virtual void redo() = 0;
virtual void dispose() = 0;
};
} // namespace undo
#endif // UNDO_UNDO_COMMAND_H_INCLUDED