* Construct a lock.
* \param mutex The mutex.
*/
- Lock(Mutex& mutex) :
+ explicit Lock(Mutex& mutex) :
mMutex(mutex),
mIsLocked(false) {}
* Construct a lock.
* \param mutex The mutex.
*/
- ScopedLock(Mutex& mutex) :
+ explicit ScopedLock(Mutex& mutex) :
Lock(mutex)
{
acquire();
* Construct a semaphore.
* \param value The initial value of the semaphore.
*/
- Semaphore(uint32_t value)
+ explicit Semaphore(uint32_t value)
{
mSemaphore = SDL_CreateSemaphore(value);
}
* Construct a lock.
* \param semaphore The semaphore.
*/
- Lock(Semaphore& semaphore) :
+ explicit Lock(Semaphore& semaphore) :
mSemaphore(semaphore),
mIsLocked(false) {}
* Construct a lock.
* \param semaphore The semaphore.
*/
- ScopedLock(Semaphore& semaphore) :
+ explicit ScopedLock(Semaphore& semaphore) :
Lock(semaphore)
{
acquire();