From 50fc7e24c6daa6dee1deec8191abac5d2ec2c6d2 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 1 Sep 2018 13:56:45 -0400 Subject: [PATCH] refactor --- GUI/host/textthread.cc | 4 ++-- GUI/host/textthread.h | 3 +-- GUI/mainwindow.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/GUI/host/textthread.cc b/GUI/host/textthread.cc index efcf729..aee42ef 100644 --- a/GUI/host/textthread.cc +++ b/GUI/host/textthread.cc @@ -51,10 +51,10 @@ void TextThread::AddSentence(std::wstring sentence) storage.append(sentence); } -void TextThread::AddText(const BYTE *con, int len) +void TextThread::AddText(const BYTE* data, int len) { LOCK(ttMutex); - buffer.insert(buffer.end(), con, con + len); + buffer.insert(buffer.end(), data, data + len); timestamp = GetTickCount(); } diff --git a/GUI/host/textthread.h b/GUI/host/textthread.h index c9974f3..c61e62a 100644 --- a/GUI/host/textthread.h +++ b/GUI/host/textthread.h @@ -7,7 +7,6 @@ #include "common.h" #include "types.h" - class TextThread { typedef std::function ThreadOutputCallback; @@ -20,7 +19,7 @@ public: void RegisterOutputCallBack(ThreadOutputCallback cb) { Output = cb; } - void AddText(const BYTE *con, int len); + void AddText(const BYTE* data, int len); void AddSentence(std::wstring sentence); private: diff --git a/GUI/mainwindow.h b/GUI/mainwindow.h index e741f19..0e20e51 100644 --- a/GUI/mainwindow.h +++ b/GUI/mainwindow.h @@ -50,7 +50,7 @@ private: std::unordered_map GetInfoForExtensions(TextThread* thread); QVector GetAllHooks(DWORD processId); - Ui::MainWindow *ui; + Ui::MainWindow* ui; QComboBox* processCombo; QComboBox* ttCombo; QComboBox* extenCombo;