From 97b5fbda7fbe33c43babeff807e434f1784aaec8 Mon Sep 17 00:00:00 2001 From: Emanuele Torre Date: Thu, 28 May 2020 14:11:51 +0200 Subject: [PATCH] IRCClient: remove some unused headers and replace tabs with spaces --- Applications/IRCClient/IRCAppWindow.cpp | 1 - Applications/IRCClient/IRCAppWindow.h | 1 + Applications/IRCClient/IRCChannel.cpp | 1 - Applications/IRCClient/IRCChannel.h | 5 ++-- Applications/IRCClient/IRCClient.cpp | 29 ++++++++----------- Applications/IRCClient/IRCLogBuffer.cpp | 2 -- Applications/IRCClient/IRCQuery.cpp | 1 - Applications/IRCClient/IRCQuery.h | 4 +-- Applications/IRCClient/IRCWindow.cpp | 2 +- Applications/IRCClient/IRCWindowListModel.cpp | 3 -- 10 files changed, 18 insertions(+), 31 deletions(-) diff --git a/Applications/IRCClient/IRCAppWindow.cpp b/Applications/IRCClient/IRCAppWindow.cpp index 00e2cd77848..0fbb1fe2137 100644 --- a/Applications/IRCClient/IRCAppWindow.cpp +++ b/Applications/IRCClient/IRCAppWindow.cpp @@ -41,7 +41,6 @@ #include #include #include -#include static IRCAppWindow* s_the; diff --git a/Applications/IRCClient/IRCAppWindow.h b/Applications/IRCClient/IRCAppWindow.h index 241955af419..10f0f5a4eec 100644 --- a/Applications/IRCClient/IRCAppWindow.h +++ b/Applications/IRCClient/IRCAppWindow.h @@ -33,6 +33,7 @@ class IRCAppWindow : public GUI::Window { C_OBJECT(IRCAppWindow); + public: virtual ~IRCAppWindow() override; diff --git a/Applications/IRCClient/IRCChannel.cpp b/Applications/IRCClient/IRCChannel.cpp index dee3111eda3..4bbec9cb110 100644 --- a/Applications/IRCClient/IRCChannel.cpp +++ b/Applications/IRCClient/IRCChannel.cpp @@ -28,7 +28,6 @@ #include "IRCChannelMemberListModel.h" #include "IRCClient.h" #include -#include IRCChannel::IRCChannel(IRCClient& client, const String& name) : m_client(client) diff --git a/Applications/IRCClient/IRCChannel.h b/Applications/IRCClient/IRCChannel.h index 8bc8e58c06e..d48e5afc5dd 100644 --- a/Applications/IRCClient/IRCChannel.h +++ b/Applications/IRCClient/IRCChannel.h @@ -27,10 +27,9 @@ #pragma once #include "IRCLogBuffer.h" -#include -#include -#include #include +#include +#include #include class IRCClient; diff --git a/Applications/IRCClient/IRCClient.cpp b/Applications/IRCClient/IRCClient.cpp index f6f48371952..947be679f34 100644 --- a/Applications/IRCClient/IRCClient.cpp +++ b/Applications/IRCClient/IRCClient.cpp @@ -35,13 +35,8 @@ #include #include #include -#include -#include -#include -#include #include -#include -#include +#include #define IRC_DEBUG @@ -305,15 +300,15 @@ void IRCClient::handle(const Message& msg) return handle_rpl_namreply(msg); case RPL_ENDOFNAMES: return handle_rpl_endofnames(msg); - case RPL_BANLIST: + case RPL_BANLIST: return handle_rpl_banlist(msg); - case RPL_ENDOFBANLIST: + case RPL_ENDOFBANLIST: return handle_rpl_endofbanlist(msg); - case ERR_NOSUCHNICK: + case ERR_NOSUCHNICK: return handle_err_nosuchnick(msg); - case ERR_UNKNOWNCOMMAND: + case ERR_UNKNOWNCOMMAND: return handle_err_unknowncommand(msg); - case ERR_NICKNAMEINUSE: + case ERR_NICKNAMEINUSE: return handle_err_nicknameinuse(msg); } } @@ -901,7 +896,7 @@ void IRCClient::handle_user_command(const String& input) auto channel = parts[1]; part_channel(channel); join_channel(channel); - } else { + } else { auto* window = current_window(); if (!window || window->type() != IRCWindow::Type::Channel) return; @@ -915,7 +910,7 @@ void IRCClient::handle_user_command(const String& input) if (parts.size() >= 2) { auto channel = parts[1]; send_banlist(channel); - } else { + } else { auto* window = current_window(); if (!window || window->type() != IRCWindow::Type::Channel) return; @@ -936,14 +931,14 @@ void IRCClient::handle_user_command(const String& input) auto channel = parts[1]; auto topic = input.view().substring_view_starting_after_substring(channel); send_topic(channel, topic); - } else { + } else { auto* window = current_window(); if (!window || window->type() != IRCWindow::Type::Channel) return; auto channel = window->channel().name(); auto topic = input.view().substring_view_starting_after_substring(parts[0]); send_topic(channel, topic); - } + } return; } if (command == "/KICK") { @@ -959,7 +954,7 @@ void IRCClient::handle_user_command(const String& input) auto nick = parts[2]; auto reason = input.view().substring_view_starting_after_substring(nick); send_kick(channel, nick, reason); - } else { + } else { auto* window = current_window(); if (!window || window->type() != IRCWindow::Type::Channel) return; @@ -967,7 +962,7 @@ void IRCClient::handle_user_command(const String& input) auto nick = parts[1]; auto reason = input.view().substring_view_starting_after_substring(nick); send_kick(channel, nick, reason); - } + } return; } if (command == "/LIST") { diff --git a/Applications/IRCClient/IRCLogBuffer.cpp b/Applications/IRCClient/IRCLogBuffer.cpp index 0dd2d8fc158..f1c877f16f4 100644 --- a/Applications/IRCClient/IRCLogBuffer.cpp +++ b/Applications/IRCClient/IRCLogBuffer.cpp @@ -31,9 +31,7 @@ #include #include #include -#include #include -#include #include NonnullRefPtr IRCLogBuffer::create() diff --git a/Applications/IRCClient/IRCQuery.cpp b/Applications/IRCClient/IRCQuery.cpp index abf3df68c2a..286e1aba9d8 100644 --- a/Applications/IRCClient/IRCQuery.cpp +++ b/Applications/IRCClient/IRCQuery.cpp @@ -27,7 +27,6 @@ #include "IRCQuery.h" #include "IRCClient.h" #include -#include IRCQuery::IRCQuery(IRCClient& client, const String& name) : m_client(client) diff --git a/Applications/IRCClient/IRCQuery.h b/Applications/IRCClient/IRCQuery.h index 26625e490a3..31c622edcc6 100644 --- a/Applications/IRCClient/IRCQuery.h +++ b/Applications/IRCClient/IRCQuery.h @@ -27,10 +27,10 @@ #pragma once #include "IRCLogBuffer.h" -#include #include -#include #include +#include +#include #include class IRCClient; diff --git a/Applications/IRCClient/IRCWindow.cpp b/Applications/IRCClient/IRCWindow.cpp index b35044efa54..e4f9f6aa214 100644 --- a/Applications/IRCClient/IRCWindow.cpp +++ b/Applications/IRCClient/IRCWindow.cpp @@ -31,8 +31,8 @@ #include #include #include -#include #include +#include #include #include #include diff --git a/Applications/IRCClient/IRCWindowListModel.cpp b/Applications/IRCClient/IRCWindowListModel.cpp index 6e024c78782..0a205111b36 100644 --- a/Applications/IRCClient/IRCWindowListModel.cpp +++ b/Applications/IRCClient/IRCWindowListModel.cpp @@ -27,9 +27,6 @@ #include "IRCWindowListModel.h" #include "IRCChannel.h" #include "IRCClient.h" -#include "IRCWindow.h" -#include -#include IRCWindowListModel::IRCWindowListModel(IRCClient& client) : m_client(client)