]> git.lyx.org Git - features.git/commitdiff
Rename a var "sort" to not mask std::sort()
authorScott Kostyshak <skostysh@lyx.org>
Thu, 5 Mar 2020 17:16:26 +0000 (12:16 -0500)
committerScott Kostyshak <skostysh@lyx.org>
Thu, 5 Mar 2020 17:46:48 +0000 (12:46 -0500)
This allows us to use sort() without the "std" prefix.

src/frontends/qt/GuiRef.cpp

index 7e98e4864ad9efac30ad02fbc35f47bd49141bce..cb4baf9008ee64ee430c857f3581497bec3639db 100644 (file)
@@ -495,14 +495,14 @@ void GuiRef::redoRefs()
        if (noprefix)
                refsCategories.insert(0, qt_("<No prefix>"));
 
-       QString const sort = sortingCO->isEnabled() ?
-                               sortingCO->itemData(sortingCO->currentIndex()).toString()
-                               : QString();
-       if (sort == "nocase")
-               std::sort(refsStrings.begin(), refsStrings.end(),
+       QString const sort_method = sortingCO->isEnabled() ?
+                                       sortingCO->itemData(sortingCO->currentIndex()).toString()
+                                       : QString();
+       if (sort_method == "nocase")
+               sort(refsStrings.begin(), refsStrings.end(),
                          caseInsensitiveLessThan /*defined above*/);
-       else if (sort == "case")
-               std::sort(refsStrings.begin(), refsStrings.end());
+       else if (sort_method == "case")
+               sort(refsStrings.begin(), refsStrings.end());
 
        if (groupCB->isChecked()) {
                QList<QTreeWidgetItem *> refsCats;