summaryrefslogtreecommitdiffstats
path: root/src/handle_event.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/handle_event.cpp')
-rw-r--r--src/handle_event.cpp26
1 files changed, 4 insertions, 22 deletions
diff --git a/src/handle_event.cpp b/src/handle_event.cpp
index fa543e6..d75c42d 100644
--- a/src/handle_event.cpp
+++ b/src/handle_event.cpp
@@ -1,18 +1,5 @@
-/* This file is part of Patchage.
- * Copyright 2007-2020 David Robillard <d@drobilla.net>
- *
- * Patchage is free software: you can redistribute it and/or modify it under
- * the terms of the GNU General Public License as published by the Free
- * Software Foundation, either version 3 of the License, or (at your option)
- * any later version.
- *
- * Patchage is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Patchage. If not, see <http://www.gnu.org/licenses/>.
- */
+// Copyright 2007-2020 David Robillard <d@drobilla.net>
+// SPDX-License-Identifier: GPL-3.0-or-later
#include "handle_event.hpp"
@@ -29,12 +16,9 @@
PATCHAGE_DISABLE_FMT_WARNINGS
#include <fmt/core.h>
-#include <fmt/ostream.h>
PATCHAGE_RESTORE_WARNINGS
-#include <boost/variant/apply_visitor.hpp>
-
-#include <iosfwd>
+#include <variant>
namespace patchage {
@@ -43,8 +27,6 @@ namespace {
class EventHandler
{
public:
- using result_type = void; ///< For boost::apply_visitor
-
explicit EventHandler(Configuration& conf,
Metadata& metadata,
Canvas& canvas,
@@ -161,7 +143,7 @@ handle_event(Configuration& conf,
const Event& event)
{
EventHandler handler{conf, metadata, canvas, log};
- boost::apply_visitor(handler, event);
+ std::visit(handler, event);
}
} // namespace patchage