From 79b60f69a9992a8aa30cb3b9ec700c4a2bd2f299 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Thu, 17 May 2018 22:55:53 +1000 Subject: [PATCH] Small code cleanups --- src/client.hh | 3 --- src/ncurses_ui.cc | 2 +- src/remote.cc | 4 ++-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/client.hh b/src/client.hh index 9d3daccd..4b640ebe 100644 --- a/src/client.hh +++ b/src/client.hh @@ -18,7 +18,6 @@ class UserInterface; class String; struct Key; -enum class EventMode; enum class InfoStyle; enum class MenuStyle; @@ -83,8 +82,6 @@ private: void close_buffer_reload_dialog(); void reload_buffer(); - Optional get_next_key(EventMode mode); - DisplayLine generate_mode_line() const; std::unique_ptr m_ui; diff --git a/src/ncurses_ui.cc b/src/ncurses_ui.cc index 0bb1278d..ebbbc8db 100644 --- a/src/ncurses_ui.cc +++ b/src/ncurses_ui.cc @@ -251,7 +251,7 @@ default_colors = { NCursesUI::NCursesUI() : m_stdin_watcher{0, FdEvents::Read, - [this](FDWatcher&, FdEvents, EventMode mode) { + [this](FDWatcher&, FdEvents, EventMode) { if (not m_on_key) return; diff --git a/src/remote.cc b/src/remote.cc index c0fcf563..c5c04915 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -370,7 +370,7 @@ static bool send_data(int fd, RemoteBuffer& buffer) RemoteUI::RemoteUI(int socket, DisplayCoord dimensions) : m_socket_watcher(socket, FdEvents::Read | FdEvents::Write, - [this](FDWatcher& watcher, FdEvents events, EventMode mode) { + [this](FDWatcher& watcher, FdEvents events, EventMode) { const int sock = watcher.fd(); try { @@ -790,7 +790,7 @@ Server::Server(String session_name) throw runtime_error(format("unable to listen on socket '{}': {}", addr.sun_path, strerror(errno))); - auto accepter = [this](FDWatcher& watcher, FdEvents, EventMode mode) { + auto accepter = [this](FDWatcher& watcher, FdEvents, EventMode) { sockaddr_un client_addr; socklen_t client_addr_len = sizeof(sockaddr_un); int sock = accept(watcher.fd(), (sockaddr*) &client_addr,