Bug 1153348 - Add an analysis to prohibit operator bools which aren't marked as either explicit or MOZ_IMPLICIT; r=jrmuizel

This is the counterpart to the existing analysis to catch
constructors which aren't marked as either explicit or
MOZ_IMPLICIT.
This commit is contained in:
Ehsan Akhgari
2015-04-10 23:05:46 -04:00
parent e8efe7e4db
commit 9aea0e3f0a
17 changed files with 119 additions and 29 deletions

View File

@@ -1167,7 +1167,7 @@ public:
if (plugin)
mLibrary = plugin->GetLibrary();
}
operator bool() { return !!mLibrary; }
explicit operator bool() { return !!mLibrary; }
PluginLibrary* operator->() { return mLibrary; }
private: