pr345-explicit-conversion.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. --- a/src/rose/rose_graph.h
  2. +++ b/src/rose/rose_graph.h
  3. @@ -112,7 +112,7 @@ struct LeftEngInfo {
  4. }
  5. size_t hash() const;
  6. void reset(void);
  7. - operator bool() const;
  8. + explicit operator bool() const;
  9. bool tracksSom() const { return !!haig; }
  10. };
  11. @@ -133,7 +133,7 @@ struct RoseSuffixInfo {
  12. bool operator<(const RoseSuffixInfo &b) const;
  13. size_t hash() const;
  14. void reset(void);
  15. - operator bool() const { return graph || castle || haig || rdfa || tamarama; }
  16. + explicit operator bool() const { return graph || castle || haig || rdfa || tamarama; }
  17. };
  18. /** \brief Properties attached to each Rose graph vertex. */
  19. --- a/src/util/ue2_graph.h
  20. +++ b/src/util/ue2_graph.h
  21. @@ -176,7 +176,7 @@ public:
  22. vertex_descriptor() : p(nullptr), serial(0) {}
  23. explicit vertex_descriptor(vertex_node *pp) : p(pp), serial(pp->serial) {}
  24. - operator bool() const { return p; }
  25. + explicit operator bool() const { return p; }
  26. bool operator<(const vertex_descriptor b) const {
  27. if (p && b.p) {
  28. /* no vertices in the same graph can have the same serial */