mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-17 19:05:31 +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.
|
//! Executes some code (in the caller's thread) if the task has finished.
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
template <typename F>
|
template <typename F>
|
||||||
bool doIfFinished(F functor) const
|
void doIfFinished(F functor) const
|
||||||
{
|
{
|
||||||
QMutexLocker lock(&m_finishedMutex);
|
QMutexLocker lock(&m_finishedMutex);
|
||||||
if (m_finished) { functor(); }
|
if (m_finished) { functor(); }
|
||||||
@@ -107,7 +107,7 @@ namespace BlackMisc
|
|||||||
//! Executes some code (in the caller's thread) if the task has not finished.
|
//! Executes some code (in the caller's thread) if the task has not finished.
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
template <typename F>
|
template <typename F>
|
||||||
bool doIfNotFinished(F functor) const
|
void doIfNotFinished(F functor) const
|
||||||
{
|
{
|
||||||
QMutexLocker lock(&m_finishedMutex);
|
QMutexLocker lock(&m_finishedMutex);
|
||||||
if (! m_finished) { functor(); }
|
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.
|
//! Executes some code (in the caller's thread) if the task has not finished and some different code if it has finished.
|
||||||
//! \threadsafe
|
//! \threadsafe
|
||||||
template <typename F1, typename F2>
|
template <typename F1, typename F2>
|
||||||
bool doIfFinishedElse(F1 ifFunctor, F2 elseFunctor) const
|
void doIfFinishedElse(F1 ifFunctor, F2 elseFunctor) const
|
||||||
{
|
{
|
||||||
QMutexLocker lock(&m_finishedMutex);
|
QMutexLocker lock(&m_finishedMutex);
|
||||||
if (m_finished) { ifFunctor(); } else { elseFunctor(); }
|
if (m_finished) { ifFunctor(); } else { elseFunctor(); }
|
||||||
|
|||||||
Reference in New Issue
Block a user