use operator "==" instead of "strcmp"

This commit is contained in:
oltolm committed 2025-06-09 12:21:32 +02:00
1 parent 179d3399bd
commit ce4415eeed
2 files changed
+4 -4

No files matched your search

+3 -3
View File
@@ -499,7 +499,7 @@ bool SavedataBrowser::ByFilename(const UI::View *v1, const UI::View *v2) {
const SavedataButton *b1 = static_cast<const SavedataButton *>(v1);
const SavedataButton *b2 = static_cast<const SavedataButton *>(v2);
return strcmp(b1->GamePath().c_str(), b2->GamePath().c_str()) < 0;
return b1->GamePath() < b2->GamePath();
}
void SavedataBrowser::PrepSize(UI::View *v) {
@@ -517,7 +517,7 @@ bool SavedataBrowser::BySize(const UI::View *v1, const UI::View *v2) {
return true;
else if (size1 < size2)
return false;
return strcmp(b1->GamePath().c_str(), b2->GamePath().c_str()) < 0;
return b1->GamePath() < b2->GamePath();
}
void SavedataBrowser::PrepDate(UI::View *v) {
@@ -535,7 +535,7 @@ bool SavedataBrowser::ByDate(const UI::View *v1, const UI::View *v2) {
return true;
if (time1 < time2)
return false;
return strcmp(b1->GamePath().c_str(), b2->GamePath().c_str()) < 0;
return b1->GamePath() < b2->GamePath();
}
void SavedataBrowser::Refresh() {
+1 -1
View File
@@ -259,7 +259,7 @@ bool IsRootForAccessibleItems(Path path, std::list<std::string>& subRoot, bool b
if (!endsWith(sub, ":")) {
bool alreadyAdded = false;
for each (auto sItem in subRoot) {
if (!strcmp(sItem.c_str(), sub.c_str())) {
if (sItem == sub) {
alreadyAdded = true;
break;
}