Skip to content

Commit

Permalink
update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
hedzr committed Oct 17, 2021
1 parent 3d3af1f commit 3deea06
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ namespace dp { namespace undo { namespace test {
// current selection in current editor ...
std::cout << "<<" << _info << ">>" << '\n';
}
MementoPtr save_state_impl(CmdSP &sender) override {
MementoPtr save_state_impl(CmdSP &sender, ContextT &) override {
return std::make_unique<Memento>(sender, _info);
}
void undo_impl(CmdSP &sender, ContextT &, Memento &memento) override {
Expand All @@ -66,7 +66,7 @@ namespace dp { namespace undo { namespace test {
class UndoCmd : public undo_cxx::base_undo_cmd_t<State> {
public:
~UndoCmd() {}
UndoCmd() {}
using undo_cxx::base_undo_cmd_t<State>::base_undo_cmd_t;
UndoCmd(std::string const &default_state_info)
: _info(default_state_info) {}
UNDO_CXX_DEFINE_DEFAULT_CMD_TYPES(UndoCmd, undo_cxx::base_undo_cmd_t);
Expand All @@ -76,7 +76,7 @@ namespace dp { namespace undo { namespace test {
std::cout << "<<" << _info << ">>" << '\n';
Base::do_execute(sender, ctx);
}
MementoPtr save_state_impl(CmdSP &sender) override {
MementoPtr save_state_impl(CmdSP &sender, ContextT &) override {
return std::make_unique<Memento>(sender, _info);
}
void undo_impl(CmdSP &sender, ContextT &, Memento &memento) override {
Expand All @@ -97,7 +97,7 @@ namespace dp { namespace undo { namespace test {
class RedoCmd : public undo_cxx::base_redo_cmd_t<State> {
public:
~RedoCmd() {}
RedoCmd() {}
using undo_cxx::base_redo_cmd_t<State>::base_redo_cmd_t;
RedoCmd(std::string const &default_state_info)
: _info(default_state_info) {}
UNDO_CXX_DEFINE_DEFAULT_CMD_TYPES(RedoCmd, undo_cxx::base_redo_cmd_t);
Expand All @@ -107,7 +107,7 @@ namespace dp { namespace undo { namespace test {
std::cout << "<<" << _info << ">>" << '\n';
Base::do_execute(sender, ctx);
}
MementoPtr save_state_impl(CmdSP &sender) override {
MementoPtr save_state_impl(CmdSP &sender, ContextT &) override {
return std::make_unique<Memento>(sender, _info);
}
void undo_impl(CmdSP &sender, ContextT &, Memento &memento) override {
Expand Down
4 changes: 2 additions & 2 deletions tests/undo.cc
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ namespace dp { namespace undo { namespace test {
class UndoCmd : public undo_cxx::base_undo_cmd_t<State> {
public:
~UndoCmd() {}
UndoCmd() {}
using undo_cxx::base_undo_cmd_t<State>::base_undo_cmd_t;
UndoCmd(std::string const &default_state_info)
: _info(default_state_info) {}
UNDO_CXX_DEFINE_DEFAULT_CMD_TYPES(UndoCmd, undo_cxx::base_undo_cmd_t);
Expand Down Expand Up @@ -90,7 +90,7 @@ namespace dp { namespace undo { namespace test {
class RedoCmd : public undo_cxx::base_redo_cmd_t<State> {
public:
~RedoCmd() {}
RedoCmd() {}
using undo_cxx::base_redo_cmd_t<State>::base_redo_cmd_t;
RedoCmd(std::string const &default_state_info)
: _info(default_state_info) {}
UNDO_CXX_DEFINE_DEFAULT_CMD_TYPES(RedoCmd, undo_cxx::base_redo_cmd_t);
Expand Down

0 comments on commit 3deea06

Please sign in to comment.