Skip to content

Commit

Permalink
Add position type check to layout metrics == operator (facebook#42020)
Browse files Browse the repository at this point in the history
Summary:

I added position type in D51412428 (facebook#41819). I didn't notice this == override which makes it so position type in layout metrics will not be updated if it changes.

To use this cpp 20 feature we needed to change a few buck files which is also done here

Changelog: [Internal]

Differential Revision: D52339890
  • Loading branch information
joevilches authored and facebook-github-bot committed Dec 26, 2023
1 parent 55e4543 commit e1bc317
Showing 1 changed file with 1 addition and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,24 +65,7 @@ struct LayoutMetrics {
frame.size.height - borderWidth.top - borderWidth.bottom}};
}

bool operator==(const LayoutMetrics& rhs) const {
return std::tie(
this->frame,
this->contentInsets,
this->borderWidth,
this->displayType,
this->layoutDirection,
this->pointScaleFactor,
this->overflowInset) ==
std::tie(
rhs.frame,
rhs.contentInsets,
rhs.borderWidth,
rhs.displayType,
rhs.layoutDirection,
rhs.pointScaleFactor,
rhs.overflowInset);
}
bool operator==(const LayoutMetrics& rhs) const = default;

bool operator!=(const LayoutMetrics& rhs) const {
return !(*this == rhs);
Expand Down

0 comments on commit e1bc317

Please sign in to comment.