]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/Thread.hh
constructors should be explicit
[chaz/yoink] / src / Moof / Thread.hh
index 4888ab6408be05225dc9fe880730f9bd4fe474ba..2987a59b968716b7649c1eb5d180072f3c308e8a 100644 (file)
@@ -252,7 +252,7 @@ public:
                 * Construct a lock.
                 * \param mutex The mutex.
                 */
-        Lock(Mutex& mutex) :
+        explicit Lock(Mutex& mutex) :
                        mMutex(mutex),
                        mIsLocked(false) {}
 
@@ -317,7 +317,7 @@ public:
                 * Construct a lock.
                 * \param mutex The mutex.
                 */
-               ScopedLock(Mutex& mutex) :
+               explicit ScopedLock(Mutex& mutex) :
                        Lock(mutex)
                {
                        acquire();
@@ -458,7 +458,7 @@ public:
         * Construct a semaphore.
         * \param value The initial value of the semaphore.
         */
-    Semaphore(uint32_t value)
+    explicit Semaphore(uint32_t value)
        {
                mSemaphore = SDL_CreateSemaphore(value);
        }
@@ -531,7 +531,7 @@ public:
                 * Construct a lock.
                 * \param semaphore The semaphore.
                 */
-        Lock(Semaphore& semaphore) :
+        explicit Lock(Semaphore& semaphore) :
                        mSemaphore(semaphore),
                        mIsLocked(false) {}
 
@@ -593,7 +593,7 @@ public:
                 * Construct a lock.
                 * \param semaphore The semaphore.
                 */
-        ScopedLock(Semaphore& semaphore) :
+        explicit ScopedLock(Semaphore& semaphore) :
                        Lock(semaphore)
                {
                        acquire();
This page took 0.022079 seconds and 4 git commands to generate.