Make nearly all bool operators explicit.

These are a bit dangerous because the casting can happen in quite
unexpected circumstances and lead to undesirable comparison results.
This commit is contained in:
Johanna Amann 2018-01-18 14:02:03 -08:00
parent 5ed5587b5c
commit 41285abea5
7 changed files with 7 additions and 7 deletions

View file

@ -78,7 +78,7 @@ struct VersionNumber {
/**
* Returns true if the version is set to a non-negative value.
*/
operator bool() const { return major >= 0 && minor >= 0; }
explicit operator bool() const { return major >= 0 && minor >= 0; }
};
/**