]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
fix: Mark operator bool explicit 90/head
authorBigRedEye <mail@bigredeye.me>
Sat, 8 Jan 2022 01:12:16 +0000 (04:12 +0300)
committerBigRedEye <mail@bigredeye.me>
Mon, 7 Feb 2022 21:22:23 +0000 (00:22 +0300)
src/rose/rose_graph.h
src/util/ue2_graph.h

index 499d796acea128aab4b506dd074c932e58b3f457..b5bf1985d8d71d5d3646e0c291afa938164113bb 100644 (file)
@@ -112,7 +112,7 @@ struct LeftEngInfo {
     }
     size_t hash() const;
     void reset(void);
-    operator bool() const;
+    explicit operator bool() const;
     bool tracksSom() const { return !!haig; }
 };
 
@@ -133,7 +133,7 @@ struct RoseSuffixInfo {
     bool operator<(const RoseSuffixInfo &b) const;
     size_t hash() const;
     void reset(void);
-    operator bool() const { return graph || castle || haig || rdfa || tamarama; }
+    explicit operator bool() const { return graph || castle || haig || rdfa || tamarama; }
 };
 
 /** \brief Properties attached to each Rose graph vertex. */
index b8e2e935d7ed9c420aed3f5b66da1ec0e8eadb0b..aa9718d73a656902c73b23c9be5247efd017a35f 100644 (file)
@@ -176,7 +176,7 @@ public:
     vertex_descriptor() : p(nullptr), serial(0) {}
     explicit vertex_descriptor(vertex_node *pp) : p(pp), serial(pp->serial) {}
 
-    operator bool() const { return p; }
+    explicit operator bool() const { return p; }
     bool operator<(const vertex_descriptor b) const {
         if (p && b.p) {
             /* no vertices in the same graph can have the same serial */