diff --git a/CHANGES b/CHANGES index e2dc9bc540..f78d03bf5f 100644 --- a/CHANGES +++ b/CHANGES @@ -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 * Logging: implement get_filter_names and small fixes. diff --git a/VERSION b/VERSION index 9921a5c610..4967f412ea 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.5-390 +2.5-392 diff --git a/src/UID.h b/src/UID.h index 3a32b843f0..367b67d56d 100644 --- a/src/UID.h +++ b/src/UID.h @@ -59,7 +59,6 @@ public: /** * @return false if the UID instance was created via the default ctor * and not yet initialized w/ Set(). - * TODO: this would be better as an "explicit" conversion operator (C++11) */ explicit operator bool() const { return initialized; } diff --git a/src/analyzer/Tag.h b/src/analyzer/Tag.h index 35dc3b2ac5..ad701a877f 100644 --- a/src/analyzer/Tag.h +++ b/src/analyzer/Tag.h @@ -42,9 +42,6 @@ public: /** * Returns false if the tag represents an error value rather than a * 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(); } diff --git a/src/file_analysis/Tag.h b/src/file_analysis/Tag.h index afa1a22ec0..33be048108 100644 --- a/src/file_analysis/Tag.h +++ b/src/file_analysis/Tag.h @@ -41,10 +41,6 @@ public: /** * Returns false if the tag represents an error value rather than a * 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(); }