summaryrefslogtreecommitdiff
path: root/embedserv/source/embed/tracker.cxx
diff options
context:
space:
mode:
authorAmandaQuaresmaCoutinho <quaresmaamanda4@gmail.com>2024-04-04 19:46:32 +0200
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2024-04-08 20:45:39 +0200
commitccebd10bc4bea1e65b606a054db3f98ab07850cf (patch)
tree28d78cd0e72351a1b6a2cf3a402a1253377afc50 /embedserv/source/embed/tracker.cxx
parentbb89fe7ab67c1476b6cf250f236bd5b643a77c6e (diff)
tdf#148251 Use std::swap instead of using temporary values
Change-Id: I7629d86b8f85a493bd3ad6b9c465a81c746b1dab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165802 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'embedserv/source/embed/tracker.cxx')
-rw-r--r--embedserv/source/embed/tracker.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/embedserv/source/embed/tracker.cxx b/embedserv/source/embed/tracker.cxx
index 2a502671bb63..fb331dfa1478 100644
--- a/embedserv/source/embed/tracker.cxx
+++ b/embedserv/source/embed/tracker.cxx
@@ -201,17 +201,10 @@ void winwrap::TransformRect(LPRECT rect,HWND pWnd,HWND pWndClipTo)
static void NormalizeRect(LPRECT rp)
{
- if(rp->left > rp->right) {
- UINT tmp = rp->left;
- rp->left = rp->right;
- rp->right = tmp;
- }
-
- if(rp->top > rp->bottom) {
- UINT tmp = rp->top;
- rp->top = rp->bottom;
- rp->bottom = tmp;
- }
+ if(rp->left > rp->right)
+ std::swap(rp->left, rp->right);
+ if(rp->top > rp->bottom)
+ std::swap(rp->top, rp->bottom);
}