include/tools/gen.hxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-)
New commits: commit f57a7b374e0f2d878cee1fa020af3323145b56a8 Author: Chris Sherlock <chris.sherloc...@gmail.com> AuthorDate: Sun Jul 24 18:55:34 2022 +1000 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Fri Aug 19 10:19:48 2022 +0200 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 <qui...@gmail.com> 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)