i18npool/source/indexentry/indexentrysupplier_default.cxx |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 44f182a0e03a735fa0406980cd1161f9da9799b4
Author:     Simon Chenery <simon_chen...@yahoo.com>
AuthorDate: Mon Apr 21 19:11:18 2025 +0200
Commit:     Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
CommitDate: Sat Apr 26 13:11:17 2025 +0200

    tdf#148251 use std::swap in indexentrysupplier_default.cxx
    
    Change-Id: I49cf4433fd0171d6e95d0c8c8cf5ae2d40b62614
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/184416
    Tested-by: Jenkins
    Tested-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Reviewed-by: Devansh Varshney <varshney.devansh...@gmail.com>

diff --git a/i18npool/source/indexentry/indexentrysupplier_default.cxx 
b/i18npool/source/indexentry/indexentrysupplier_default.cxx
index f616c041ac71..75f5038578ff 100644
--- a/i18npool/source/indexentry/indexentrysupplier_default.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_default.cxx
@@ -247,9 +247,7 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, 
std::u16string_view algor
     for (i = 0; i < mkey_count; i++) {
         for (j=i+1; j < mkey_count; j++) {
             if (keys[mkeys[i]].mkey.getLength() < 
keys[mkeys[j]].mkey.getLength()) {
-                sal_Int16 k = mkeys[i];
-                mkeys[i] = mkeys[j];
-                mkeys[j] = k;
+                std::swap(mkeys[i], mkeys[j]);
             }
         }
     }

Reply via email to