From 6ccb5835ff55d85156be91473c598eca9d6cb9a6 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 4 Nov 2020 16:57:41 +0100 Subject: Revert "Make Lint Happy" This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4. --- src/terminal_chat_console.h | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) (limited to 'src/terminal_chat_console.h') diff --git a/src/terminal_chat_console.h b/src/terminal_chat_console.h index d052616ad..eae7c6b22 100644 --- a/src/terminal_chat_console.h +++ b/src/terminal_chat_console.h @@ -25,19 +25,20 @@ with this program; if not, write to the Free Software Foundation, Inc., #include "log.h" #include + struct ChatInterface; -class TermLogOutput : public ILogOutput -{ +class TermLogOutput : public ILogOutput { public: + void logRaw(LogLevel lev, const std::string &line) { queue.push_back(std::make_pair(lev, line)); } virtual void log(LogLevel lev, const std::string &combined, - const std::string &time, const std::string &thread_name, - const std::string &payload_text) + const std::string &time, const std::string &thread_name, + const std::string &payload_text) { std::ostringstream os(std::ios_base::binary); os << time << ": [" << thread_name << "] " << payload_text; @@ -45,15 +46,20 @@ public: queue.push_back(std::make_pair(lev, os.str())); } - MutexedQueue> queue; + MutexedQueue > queue; }; -class TerminalChatConsole : public Thread -{ +class TerminalChatConsole : public Thread { public: - TerminalChatConsole() : Thread("TerminalThread") {} - void setup(ChatInterface *iface, bool *kill_requested, const std::string &nick) + TerminalChatConsole() : + Thread("TerminalThread") + {} + + void setup( + ChatInterface *iface, + bool *kill_requested, + const std::string &nick) { m_nick = nick; m_kill_requested = kill_requested; @@ -83,13 +89,11 @@ private: void step(int ch); // Used to ensure the deinitialisation is always called. - struct CursesInitHelper - { + struct CursesInitHelper { TerminalChatConsole *cons; - CursesInitHelper(TerminalChatConsole *a_console) : cons(a_console) - { - cons->initOfCurses(); - } + CursesInitHelper(TerminalChatConsole * a_console) + : cons(a_console) + { cons->initOfCurses(); } ~CursesInitHelper() { cons->deInitOfCurses(); } }; -- cgit v1.2.3