summaryrefslogtreecommitdiff
path: root/include/tools
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2022-07-24 18:55:34 +1000
committerTomaž Vajngerl <quikee@gmail.com>2022-08-19 10:19:48 +0200
commitf57a7b374e0f2d878cee1fa020af3323145b56a8 (patch)
treeaa33a87ce241d492c076f8ec9bf0eb33eee1721e /include/tools
parente1ab83cbc47ff581dd826d757dd2997743f47d58 (diff)
tools: use std::swap() in gen.hxx
Change-Id: I01df93aa825ab7a023cd4beb385b5fb41c2847ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137389 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/gen.hxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/include/tools/gen.hxx b/include/tools/gen.hxx
index 8182676e0731..ea2c8de2c0e7 100644
--- a/include/tools/gen.hxx
+++ b/include/tools/gen.hxx
@@ -377,11 +377,7 @@ inline bool Range::Contains( tools::Long nIs ) const
inline void Range::Justify()
{
if ( mnA > mnB )
- {
- tools::Long nHelp = mnA;
- mnA = mnB;
- mnB = nHelp;
- }
+ std::swap(mnA, mnB);
}
inline bool operator ==(Range const & r1, Range const & r2)
@@ -444,11 +440,7 @@ inline bool Selection::Contains( tools::Long nIs ) const
inline void Selection::Justify()
{
if ( mnA > mnB )
- {
- tools::Long nHelp = mnA;
- mnA = mnB;
- mnB = nHelp;
- }
+ std::swap(mnA, mnB);
}
inline bool operator ==(Selection const & s1, Selection const & s2)