Remove TODO comments about using explicit bool operators

This commit is contained in:
Jon Siwek 2018-01-19 11:39:34 -06:00
parent 41285abea5
commit f25a1453ee
5 changed files with 5 additions and 9 deletions

View file

@ -1,4 +1,8 @@
2.5-392 | 2018-01-19 11:39:34 -0600
* Make nearly all bool conversion operators explicit. (Corelight)
2.5-390 | 2018-01-17 16:09:55 -0600 2.5-390 | 2018-01-17 16:09:55 -0600
* Logging: implement get_filter_names and small fixes. * Logging: implement get_filter_names and small fixes.

View file

@ -1 +1 @@
2.5-390 2.5-392

View file

@ -59,7 +59,6 @@ public:
/** /**
* @return false if the UID instance was created via the default ctor * @return false if the UID instance was created via the default ctor
* and not yet initialized w/ Set(). * and not yet initialized w/ Set().
* TODO: this would be better as an "explicit" conversion operator (C++11)
*/ */
explicit operator bool() const explicit operator bool() const
{ return initialized; } { return initialized; }

View file

@ -42,9 +42,6 @@ public:
/** /**
* Returns false if the tag represents an error value rather than a * Returns false if the tag represents an error value rather than a
* legal analyzer type. * legal analyzer type.
* TODO: make this conversion operator "explicit" (C++11) or use a
* "safe bool" idiom (not necessary if "explicit" is available),
* otherwise this may allow nonsense/undesired comparison operations.
*/ */
explicit operator bool() const { return *this != Tag(); } explicit operator bool() const { return *this != Tag(); }

View file

@ -41,10 +41,6 @@ public:
/** /**
* Returns false if the tag represents an error value rather than a * Returns false if the tag represents an error value rather than a
* legal analyzer type. * legal analyzer type.
* TODO: make this conversion operator "explicit" (C++11) or use a
* "safe bool" idiom (not necessary if "explicit" is available),
* otherwise this may allow nonsense/undesired comparison operations.
*
*/ */
explicit operator bool() const { return *this != Tag(); } explicit operator bool() const { return *this != Tag(); }