Skip to content

Commit

Permalink
Try to avoid a non-initialized warning by initializing with std::nullopt
Browse files Browse the repository at this point in the history
  • Loading branch information
afabri committed Feb 9, 2024
1 parent 790d9ca commit d12baf7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class First_intersection_traits
Result;
public:
First_intersection_traits(const AABBTraits& traits)
: m_result(), m_traits(traits)
: m_result(std::nullopt), m_traits(traits)
{}

bool go_further() const {
Expand Down Expand Up @@ -202,7 +202,7 @@ class First_primitive_traits
public:
First_primitive_traits(const AABBTraits& traits)
: m_is_found(false)
, m_result()
, m_result(std::nullopt)
, m_traits(traits) {}

bool go_further() const { return !m_is_found; }
Expand Down

0 comments on commit d12baf7

Please sign in to comment.