remove some ifdefs
This commit is contained in:
@@ -450,8 +450,6 @@ __THREAD_FUNC_RET__ thread_function_once(void * t) {
|
||||
//! \return \c false если таймаут истёк
|
||||
|
||||
|
||||
# ifdef PIP_HAS_THREADS
|
||||
|
||||
__PIThreadCollection * __PIThreadCollection::instance() {
|
||||
return __PIThreadCollection_Initializer__::__instance__;
|
||||
}
|
||||
@@ -516,8 +514,6 @@ __PIThreadCollection_Initializer__::~__PIThreadCollection_Initializer__() {
|
||||
}
|
||||
}
|
||||
|
||||
# endif // PIP_HAS_THREADS
|
||||
|
||||
|
||||
PRIVATE_DEFINITION_START(PIThread)
|
||||
# if defined(WINDOWS)
|
||||
@@ -1003,10 +999,8 @@ void PIThread::runOnce(PIObject * object, const char * handler, const PIString &
|
||||
delete t;
|
||||
return;
|
||||
}
|
||||
# ifdef PIP_HAS_THREADS
|
||||
__PIThreadCollection::instance()->startedAuto(t);
|
||||
CONNECT0(void, t, stopped, __PIThreadCollection::instance(), stoppedAuto);
|
||||
# endif
|
||||
t->startOnce();
|
||||
}
|
||||
|
||||
@@ -1037,10 +1031,8 @@ void PIThread::runOnce(std::function<void()> func, const PIString & name) {
|
||||
PIThread * t = new PIThread();
|
||||
t->setName(name);
|
||||
t->setSlot(std::move(func));
|
||||
# ifdef PIP_HAS_THREADS
|
||||
__PIThreadCollection::instance()->startedAuto(t);
|
||||
CONNECT0(void, t, stopped, __PIThreadCollection::instance(), stoppedAuto);
|
||||
# endif
|
||||
t->startOnce();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user