Fixed return type to void as discussed:

https://dev.vatsim-germany.org/issues/325#note-26
This commit is contained in:
Klaus Basan
2014-10-07 13:17:37 +02:00
parent 8664ed01a8
commit 0d74afe02a

View File

@@ -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(); }