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.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Devansh Varshney <varshney.devansh614@gmail.com>
This commit is contained in:
parent
1f16e96920
commit
44f182a0e0
@ -247,9 +247,7 @@ void Index::makeIndexKeys(const lang::Locale &rLocale, std::u16string_view algor
|
|||||||
for (i = 0; i < mkey_count; i++) {
|
for (i = 0; i < mkey_count; i++) {
|
||||||
for (j=i+1; j < mkey_count; j++) {
|
for (j=i+1; j < mkey_count; j++) {
|
||||||
if (keys[mkeys[i]].mkey.getLength() < keys[mkeys[j]].mkey.getLength()) {
|
if (keys[mkeys[i]].mkey.getLength() < keys[mkeys[j]].mkey.getLength()) {
|
||||||
sal_Int16 k = mkeys[i];
|
std::swap(mkeys[i], mkeys[j]);
|
||||||
mkeys[i] = mkeys[j];
|
|
||||||
mkeys[j] = k;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user