]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/terminal_chat_console.h
Revert "Make Lint Happy"
[dragonfireclient.git] / src / terminal_chat_console.h
index d052616ad8ed4e3d7153035f9642b4746c5e5a6a..eae7c6b22db5fecfa142561f1ce0efad51ddd0fa 100644 (file)
@@ -25,19 +25,20 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "log.h"
 #include <sstream>
 
+
 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 @@ class TermLogOutput : public ILogOutput
                queue.push_back(std::make_pair(lev, os.str()));
        }
 
-       MutexedQueue<std::pair<LogLevel, std::string>> queue;
+       MutexedQueue<std::pair<LogLevel, std::string> > 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 @@ class TerminalChatConsole : public Thread
        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(); }
        };