From 1e58842ca9552bd5f560b6d6fc8da3541b9d13ec Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Fri, 3 Aug 2018 02:32:23 -0400 Subject: [PATCH] remove unneeded var --- texthook/textthread.cc | 5 ++--- texthook/textthread.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/texthook/textthread.cc b/texthook/textthread.cc index 2c00329..85c36ff 100644 --- a/texthook/textthread.cc +++ b/texthook/textthread.cc @@ -17,7 +17,6 @@ TextThread::TextThread(ThreadParameter tp, unsigned int threadNumber, DWORD stat storage(), sentenceBuffer(), status(status), - flushTimer(0), threadNumber(threadNumber), output(nullptr), tp(tp) @@ -28,7 +27,7 @@ TextThread::TextThread(ThreadParameter tp, unsigned int threadNumber, DWORD stat TextThread::~TextThread() { EnterCriticalSection(&ttCs); - KillTimer(dummyWindow, flushTimer); + KillTimer(dummyWindow, (UINT_PTR)this); LeaveCriticalSection(&ttCs); DeleteCriticalSection(&ttCs); } @@ -82,7 +81,7 @@ void TextThread::AddText(const BYTE *con, int len) { TT_LOCK; sentenceBuffer.insert(sentenceBuffer.end(), con, con + len); - flushTimer = SetTimer(dummyWindow, (UINT_PTR)this, 250, // TODO: Let user change delay before sentenceBuffer is flushed + SetTimer(dummyWindow, (UINT_PTR)this, 250, // TODO: Let user change delay before sentenceBuffer is flushed [](HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) { KillTimer(hWnd, idEvent); diff --git a/texthook/textthread.h b/texthook/textthread.h index 83e981a..161a70d 100644 --- a/texthook/textthread.h +++ b/texthook/textthread.h @@ -54,7 +54,6 @@ private: ThreadParameter tp; unsigned int threadNumber; DWORD status; - unsigned int flushTimer; }; // EOF