Skip to content

Commit ab5cc21

Browse files
author
Christos Konstantinos Matzoros
committed
Making bool explicit
1 parent 62c8435 commit ab5cc21

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/osp/graph_implementations/eigen_matrix_adapter/eigen_sparse_iterator.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ class EigenCSRRange {
7878

7979
inline bool operator!=(const Iterator &other) const { return not(*this == other); }
8080

81-
inline operator bool() const { return it_; }
81+
inline explicit operator bool() const { return it_; }
8282
};
8383

8484
EigenCSRRange(const Graph &graph, EigenIdxType idx) : graph_(graph), index_(idx) {}
@@ -143,7 +143,7 @@ class EigenCSCRange {
143143

144144
inline bool operator!=(const Iterator &other) const { return not(*this == other); }
145145

146-
inline operator bool() const { return it_; }
146+
inline explicit operator bool() const { return it_; }
147147
};
148148

149149
EigenCSCRange(const Graph &graph, EigenIdxType idx) : graph_(graph), index_(idx) {}

0 commit comments

Comments
 (0)