[Scummvm-git-logs] scummvm master -> 9cfe2cb22a51cd9110a481b1e034c7d875689ae1

sev- sev at scummvm.org
Wed Oct 21 22:15:31 UTC 2020


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9cfe2cb22a GUI: Attempt to fix dumber compilers


Commit: 9cfe2cb22a51cd9110a481b1e034c7d875689ae1
    https://github.com/scummvm/scummvm/commit/9cfe2cb22a51cd9110a481b1e034c7d875689ae1
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2020-10-22T00:15:15+02:00

Commit Message:
GUI: Attempt to fix dumber compilers

Changed paths:
    gui/launcher.cpp


diff --git a/gui/launcher.cpp b/gui/launcher.cpp
index ebd181e0d5..3be8a63b68 100644
--- a/gui/launcher.cpp
+++ b/gui/launcher.cpp
@@ -253,6 +253,15 @@ void LauncherDialog::close() {
 	ConfMan.flushToDisk();
 	Dialog::close();
 }
+struct LauncherEntry {
+	Common::String key;
+	Common::String description;
+	const Common::ConfigManager::Domain *domain;
+
+	LauncherEntry(Common::String k, Common::String d, const Common::ConfigManager::Domain *v) {
+		key = k; description = d, domain = v;
+	}
+};
 
 void LauncherDialog::updateListing() {
 	U32StringArray l;
@@ -266,17 +275,7 @@ void LauncherDialog::updateListing() {
 	bool scanEntries = numEntries == -1 ? true : (domains.size() <= numEntries);
 
 	// Turn it into a list of pointers
-	struct Entry {
-		String key;
-		String description;
-		const Common::ConfigManager::Domain *domain;
-
-		Entry(Common::String k, Common::String d, const Common::ConfigManager::Domain *v) {
-			key = k; description = d, domain = v;
-		}
-	};
-
-	Common::List<Entry> domainList;
+	Common::List<LauncherEntry> domainList;
 	for (ConfigManager::DomainMap::const_iterator iter = domains.begin(); iter != domains.end(); ++iter) {
 #ifdef __DS__
 		// DS port uses an extra section called 'ds'.  This prevents the section from being
@@ -304,20 +303,20 @@ void LauncherDialog::updateListing() {
 		}
 
 		if (!description.empty())
-			domainList.push_back(Entry(iter->_key, description, &iter->_value));
+			domainList.push_back(LauncherEntry(iter->_key, description, &iter->_value));
 	}
 
 	// Now sort the list in dictionary order
-	struct EntryComparator {
-        bool operator()(const Entry &x, const Entry &y) const {
+	struct LauncherEntryComparator {
+        bool operator()(const LauncherEntry &x, const LauncherEntry &y) const {
                 return scumm_compareDictionary(x.description.c_str(), y.description.c_str()) < 0;
         }
 	};
 
-	Common::sort(domainList.begin(), domainList.end(), EntryComparator());
+	Common::sort(domainList.begin(), domainList.end(), LauncherEntryComparator());
 
 	// And fill out our structures
-	for (Common::List<Entry>::const_iterator iter = domainList.begin(); iter != domainList.end(); ++iter) {
+	for (Common::List<LauncherEntry>::const_iterator iter = domainList.begin(); iter != domainList.end(); ++iter) {
 		color = ThemeEngine::kFontColorNormal;
 
 		if (scanEntries) {




More information about the Scummvm-git-logs mailing list