Skip to content

Commit f2fdb3b

Browse files
committed
fix: Mark operator bool explicit
1 parent 64a995b commit f2fdb3b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/rose/rose_graph.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ struct LeftEngInfo {
112112
}
113113
size_t hash() const;
114114
void reset(void);
115-
operator bool() const;
115+
explicit operator bool() const;
116116
bool tracksSom() const { return !!haig; }
117117
};
118118

@@ -133,7 +133,7 @@ struct RoseSuffixInfo {
133133
bool operator<(const RoseSuffixInfo &b) const;
134134
size_t hash() const;
135135
void reset(void);
136-
operator bool() const { return graph || castle || haig || rdfa || tamarama; }
136+
explicit operator bool() const { return graph || castle || haig || rdfa || tamarama; }
137137
};
138138

139139
/** \brief Properties attached to each Rose graph vertex. */

src/util/ue2_graph.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ class vertex_descriptor : totally_ordered<vertex_descriptor<Graph>> {
176176
vertex_descriptor() : p(nullptr), serial(0) {}
177177
explicit vertex_descriptor(vertex_node *pp) : p(pp), serial(pp->serial) {}
178178

179-
operator bool() const { return p; }
179+
explicit operator bool() const { return p; }
180180
bool operator<(const vertex_descriptor b) const {
181181
if (p && b.p) {
182182
/* no vertices in the same graph can have the same serial */

0 commit comments

Comments
 (0)