From b6a43e7283bf3d6c22a6cc4f4b6968f799175159 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sun, 10 Jun 2018 20:35:24 -0400 Subject: [PATCH] move definition of flushthread to more sensible place --- gui/TextBuffer.cpp | 11 ++++++++++- gui/window.cpp | 10 ---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/gui/TextBuffer.cpp b/gui/TextBuffer.cpp index ad3025c..f819bd1 100644 --- a/gui/TextBuffer.cpp +++ b/gui/TextBuffer.cpp @@ -1,6 +1,15 @@ #include "TextBuffer.h" -DWORD WINAPI FlushThread(LPVOID lParam); // window.cpp +DWORD WINAPI FlushThread(LPVOID lParam) +{ + TextBuffer* t = (TextBuffer*)lParam; + while (t->Running()) + { + t->Flush(); + Sleep(10); + } + return 0; +} TextBuffer::TextBuffer(HWND edit) : hThread(IthCreateThread(FlushThread, (DWORD)this)), hEdit(edit), diff --git a/gui/window.cpp b/gui/window.cpp index 66f4e27..fe84a05 100644 --- a/gui/window.cpp +++ b/gui/window.cpp @@ -806,13 +806,3 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) return 0; } -DWORD WINAPI FlushThread(LPVOID lParam) -{ - TextBuffer* t = (TextBuffer*)lParam; - while (t->Running()) - { - t->Flush(); - Sleep(10); - } - return 0; -}