From 8e78356337a3f436c238552b8fa666865b34991f Mon Sep 17 00:00:00 2001 From: hyung-hwan Date: Mon, 29 Jan 2018 05:02:51 +0000 Subject: [PATCH] renamed ThreadC to ThreadF --- qse/include/qse/si/Thread.hpp | 20 ++++++++++---------- qse/samples/si/thr02.cpp | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/qse/include/qse/si/Thread.hpp b/qse/include/qse/si/Thread.hpp index bd16a6ff..1b93f617 100644 --- a/qse/include/qse/si/Thread.hpp +++ b/qse/include/qse/si/Thread.hpp @@ -114,24 +114,24 @@ protected: }; template -class ThreadC: public Thread +class ThreadF: public Thread { public: - ThreadC () {} - ThreadC (const F& f): __lfunc(f) {} + ThreadF () {} + ThreadF (const F& f): __lfunc(f) {} #if defined(QSE_CPP_ENABLE_CPP11_MOVE) - ThreadC (F&& f): __lfunc(QSE_CPP_RVREF(f)) {} + ThreadF (F&& f): __lfunc(QSE_CPP_RVREF(f)) {} #endif static int call_func (qse_thr_t* thr, void* ctx) { - ThreadC* t = (ThreadC*)ctx; + ThreadF* t = (ThreadF*)ctx; return t->__lfunc (t); } int start (int flags = 0) QSE_CPP_NOEXCEPT { - return qse_thr_start (this, (qse_thr_rtn_t)ThreadC::call_func, this, flags); + return qse_thr_start (this, (qse_thr_rtn_t)ThreadF::call_func, this, flags); } protected: @@ -142,12 +142,12 @@ protected: #if 0 // i don't want to use std::function. -class ThreadC: public Thread +class ThreadF: public Thread { public: static int call_func (qse_thr_t* thr, void* ctx) { - ThreadC* t = (ThreadC*)ctx; + ThreadF* t = (ThreadF*)ctx; return t->__lfunc (t); } @@ -155,11 +155,11 @@ public: int start (X&& f, int flags) QSE_CPP_NOEXCEPT { this->__lfunc = QSE_CPP_RVREF(f); - return qse_thr_start (this, (qse_thr_rtn_t)ThreadC::call_func, this, flags); + return qse_thr_start (this, (qse_thr_rtn_t)ThreadF::call_func, this, flags); } protected: - std::function __lfunc; + std::function __lfunc; }; #endif diff --git a/qse/samples/si/thr02.cpp b/qse/samples/si/thr02.cpp index c5b4aa79..371b8315 100644 --- a/qse/samples/si/thr02.cpp +++ b/qse/samples/si/thr02.cpp @@ -141,7 +141,7 @@ static int test1 (void) } #if (__cplusplus >= 201103L) || (defined(_MSC_VER) && _MSC_VER >= 1900) //C++11 or later - QSE::ThreadC thr3 (lambda); + QSE::ThreadF thr3 (lambda); thr3.setStackSize (64000); thr3.setContext (&localstopreq); if (thr3.start(QSE::Thread::SIGNALS_BLOCKED) <= -1) @@ -151,7 +151,7 @@ static int test1 (void) } // turn a lambda with capture to a thread - QSE::ThreadC thr4 (lambda_with_capture); + QSE::ThreadF thr4 (lambda_with_capture); thr4.setStackSize (64000); if (thr4.start(QSE::Thread::SIGNALS_BLOCKED) <= -1) { @@ -161,7 +161,7 @@ static int test1 (void) #endif // turn a functor to a thread - QSE::ThreadC thr5; + QSE::ThreadF thr5; thr5.setStackSize (64000); thr5.setContext (&localstopreq); if (thr5.start(QSE::Thread::SIGNALS_BLOCKED) <= -1)