Skip to content

Commit

Permalink
fix: Summarizer::VariationKey operator< was unsound
Browse files Browse the repository at this point in the history
  • Loading branch information
cwaldren-ld committed Jun 1, 2024
1 parent af0333f commit fbbbe8f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,11 @@ class Summarizer {
bool operator<(VariationKey const& k) const {
if (variation < k.variation) {
return true;
} else if (variation > k.variation) {

Check warning on line 92 in libs/internal/include/launchdarkly/events/detail/summarizer.hpp

View workflow job for this annotation

GitHub Actions / cpp-linter

/libs/internal/include/launchdarkly/events/detail/summarizer.hpp:92:15 [readability-else-after-return]

do not use 'else' after 'return'
return false;
} else {
return version < k.version;
}
return version < k.version;
}
};

Expand Down

0 comments on commit fbbbe8f

Please sign in to comment.