Skip to content

Commit 3a08fb9

Browse files
committed
Add inequality operator for flutter::Size
1 parent 2b9ea14 commit 3a08fb9

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

engine/src/flutter/shell/platform/common/geometry.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class Size {
4545
bool operator==(const Size& other) const {
4646
return width_ == other.width_ && height_ == other.height_;
4747
}
48+
bool operator!=(const Size& other) const { return !(*this == other); }
4849

4950
private:
5051
double width_ = 0.0;

engine/src/flutter/shell/platform/windows/flutter_host_window_controller.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ bool FlutterHostWindowController::ModifyHostWindow(
100100
}
101101

102102
Size const size_after = GetViewSize(view_id);
103-
if (!(size_before == size_after)) {
103+
if (size_before != size_after) {
104104
changed_size = size_after;
105105
}
106106

0 commit comments

Comments
 (0)