degrade History and it's not template now

because there's no need to make command type a template parameter
This commit is contained in:
2022-08-12 14:05:06 +09:00
parent 972f5ce0a1
commit d3f245381b
7 changed files with 34 additions and 29 deletions

View File

@@ -9,10 +9,9 @@
namespace nf7 {
template <typename T = History::Command>
class AggregateCommand : public T {
class AggregateCommand : public nf7::History::Command {
public:
using CommandList = std::vector<std::unique_ptr<T>>;
using CommandList = std::vector<std::unique_ptr<Command>>;
AggregateCommand(CommandList&& commands) noexcept :
commands_(std::move(commands)) {
@@ -67,7 +66,7 @@ class AggregateCommand : public T {
}
}
std::span<const std::unique_ptr<T>> commands() const noexcept { return commands_; }
std::span<const std::unique_ptr<Command>> commands() const noexcept { return commands_; }
private:
CommandList commands_;