mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-22 23:05:36 +08:00
Fixed return type to void as discussed:
https://dev.vatsim-germany.org/issues/325#note-26
This commit is contained in:
@@ -98,7 +98,7 @@ namespace BlackMisc
|
||||
//! Executes some code (in the caller's thread) if the task has finished.
|
||||
//! \threadsafe
|
||||
template <typename F>
|
||||
bool doIfFinished(F functor) const
|
||||
void doIfFinished(F functor) const
|
||||
{
|
||||
QMutexLocker lock(&m_finishedMutex);
|
||||
if (m_finished) { functor(); }
|
||||
@@ -107,7 +107,7 @@ namespace BlackMisc
|
||||
//! Executes some code (in the caller's thread) if the task has not finished.
|
||||
//! \threadsafe
|
||||
template <typename F>
|
||||
bool doIfNotFinished(F functor) const
|
||||
void doIfNotFinished(F functor) const
|
||||
{
|
||||
QMutexLocker lock(&m_finishedMutex);
|
||||
if (! m_finished) { functor(); }
|
||||
@@ -116,7 +116,7 @@ namespace BlackMisc
|
||||
//! Executes some code (in the caller's thread) if the task has not finished and some different code if it has finished.
|
||||
//! \threadsafe
|
||||
template <typename F1, typename F2>
|
||||
bool doIfFinishedElse(F1 ifFunctor, F2 elseFunctor) const
|
||||
void doIfFinishedElse(F1 ifFunctor, F2 elseFunctor) const
|
||||
{
|
||||
QMutexLocker lock(&m_finishedMutex);
|
||||
if (m_finished) { ifFunctor(); } else { elseFunctor(); }
|
||||
|
||||
Reference in New Issue
Block a user