Make every operator bool() explicit

operator bool() is a trap, but with explicit it's far safer,
and we can use that now.

Change-Id: I4e58631c94e87c00256c3ab3cff4fd2c5f632713
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
Daniel Teske
2015-06-02 13:23:04 +02:00
parent 2189464a84
commit 26059dbb1e
8 changed files with 8 additions and 8 deletions

View File

@@ -511,7 +511,7 @@ public:
ExtensionSystem::PluginManager::addObject(watch);
}
operator bool() { return m_watched; }
explicit operator bool() { return m_watched; }
bool operator !() { return !m_watched; }
T &operator*() { return *m_watched; }
T *operator->() { return m_watched; }