Small code cleanups

This commit is contained in:
Maxime Coste 2018-05-17 22:55:53 +10:00
parent b22c8ad8c7
commit 79b60f69a9
3 changed files with 3 additions and 6 deletions

View File

@ -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<Key> get_next_key(EventMode mode);
DisplayLine generate_mode_line() const;
std::unique_ptr<UserInterface> m_ui;

View File

@ -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;

View File

@ -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,