[LyX/master] Rename a var "sort" to not mask std::sort()

Scott Kostyshak skostysh at lyx.org
Thu Mar 5 17:29:01 UTC 2020


commit 27ca2bd950148de6ae4b0c7d3ed91f4dba1f3a09
Author: Scott Kostyshak <skostysh at lyx.org>
Date:   Thu Mar 5 12:16:26 2020 -0500

    Rename a var "sort" to not mask std::sort()
    
    This allows us to use sort() without the "std" prefix.
---
 src/frontends/qt/GuiRef.cpp |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/frontends/qt/GuiRef.cpp b/src/frontends/qt/GuiRef.cpp
index 7e98e48..cb4baf9 100644
--- a/src/frontends/qt/GuiRef.cpp
+++ b/src/frontends/qt/GuiRef.cpp
@@ -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;


More information about the lyx-cvs mailing list