diff options
author | Pierre Ossman <ossman@cendio.se> | 2023-01-06 15:31:24 +0100 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2023-02-04 14:03:13 +0100 |
commit | f55abd7b0074bc6db9774ed563e02b11e634aa7d (patch) | |
tree | 4e84caf8a93212f64e4fc875a99585d7a1fd6c87 /win | |
parent | 9854463f16a3b98c55494e40f909d3b1f5f39192 (diff) | |
download | tigervnc-f55abd7b0074bc6db9774ed563e02b11e634aa7d.tar.gz tigervnc-f55abd7b0074bc6db9774ed563e02b11e634aa7d.zip |
Use operator overloading for comparison
It is much more natural than custom methods for this very common
operation.
Diffstat (limited to 'win')
-rw-r--r-- | win/rfb_win32/SDisplay.cxx | 4 | ||||
-rw-r--r-- | win/rfb_win32/SInput.cxx | 2 | ||||
-rw-r--r-- | win/rfb_win32/WMCursor.h | 2 | ||||
-rw-r--r-- | win/rfb_win32/WMWindowCopyRect.cxx | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/win/rfb_win32/SDisplay.cxx b/win/rfb_win32/SDisplay.cxx index 811b1033..612f883b 100644 --- a/win/rfb_win32/SDisplay.cxx +++ b/win/rfb_win32/SDisplay.cxx @@ -468,8 +468,8 @@ SDisplay::recreatePixelBuffer(bool force) { // If nothing has changed & a recreate has not been forced, delete // the new device context and return if (pb && !force && - newScreenRect.equals(screenRect) && - new_device->getPF().equal(pb->getPF())) { + newScreenRect == screenRect && + new_device->getPF() == pb->getPF()) { delete new_device; return; } diff --git a/win/rfb_win32/SInput.cxx b/win/rfb_win32/SInput.cxx index b76060a8..94df6e98 100644 --- a/win/rfb_win32/SInput.cxx +++ b/win/rfb_win32/SInput.cxx @@ -71,7 +71,7 @@ win32::SPointer::pointerEvent(const Point& pos, int buttonmask) DWORD flags = MOUSEEVENTF_ABSOLUTE; // - Has the pointer moved since the last event? - if (!last_position.equals(pos)) + if (last_position != pos) flags |= MOUSEEVENTF_MOVE; // - If the system swaps left and right mouse buttons then we must diff --git a/win/rfb_win32/WMCursor.h b/win/rfb_win32/WMCursor.h index 252cb056..f4366583 100644 --- a/win/rfb_win32/WMCursor.h +++ b/win/rfb_win32/WMCursor.h @@ -43,7 +43,7 @@ namespace rfb { Info() : cursor(0), visible(false) {} bool operator!=(const Info& info) { return ((cursor != info.cursor) || - (!position.equals(info.position)) || + (position != info.position) || (visible != info.visible)); } }; diff --git a/win/rfb_win32/WMWindowCopyRect.cxx b/win/rfb_win32/WMWindowCopyRect.cxx index 7655da84..4d69d54b 100644 --- a/win/rfb_win32/WMWindowCopyRect.cxx +++ b/win/rfb_win32/WMWindowCopyRect.cxx @@ -45,7 +45,7 @@ rfb::win32::WMCopyRect::processEvent() { if (IsWindow(window) && IsWindowVisible(window) && GetWindowRect(window, &wrect)) { Rect winrect(wrect.left, wrect.top, wrect.right, wrect.bottom); if (fg_window == window) { - if (!fg_window_rect.tl.equals(winrect.tl) && ut) { + if (fg_window_rect.tl != winrect.tl && ut) { // Window has moved - mark both the previous and new position as changed // (we can't use add_copied() here because we aren't that properly synced // with the actual state of the framebuffer) |