Skip to content

Commit ce4415e

Browse files
committed
use operator "==" instead of "strcmp"
1 parent 179d339 commit ce4415e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

UI/SavedataScreen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ bool SavedataBrowser::ByFilename(const UI::View *v1, const UI::View *v2) {
499499
const SavedataButton *b1 = static_cast<const SavedataButton *>(v1);
500500
const SavedataButton *b2 = static_cast<const SavedataButton *>(v2);
501501

502-
return strcmp(b1->GamePath().c_str(), b2->GamePath().c_str()) < 0;
502+
return b1->GamePath() < b2->GamePath();
503503
}
504504

505505
void SavedataBrowser::PrepSize(UI::View *v) {
@@ -517,7 +517,7 @@ bool SavedataBrowser::BySize(const UI::View *v1, const UI::View *v2) {
517517
return true;
518518
else if (size1 < size2)
519519
return false;
520-
return strcmp(b1->GamePath().c_str(), b2->GamePath().c_str()) < 0;
520+
return b1->GamePath() < b2->GamePath();
521521
}
522522

523523
void SavedataBrowser::PrepDate(UI::View *v) {
@@ -535,7 +535,7 @@ bool SavedataBrowser::ByDate(const UI::View *v1, const UI::View *v2) {
535535
return true;
536536
if (time1 < time2)
537537
return false;
538-
return strcmp(b1->GamePath().c_str(), b2->GamePath().c_str()) < 0;
538+
return b1->GamePath() < b2->GamePath();
539539
}
540540

541541
void SavedataBrowser::Refresh() {

UWP/UWPHelpers/StorageManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ bool IsRootForAccessibleItems(Path path, std::list<std::string>& subRoot, bool b
259259
if (!endsWith(sub, ":")) {
260260
bool alreadyAdded = false;
261261
for each (auto sItem in subRoot) {
262-
if (!strcmp(sItem.c_str(), sub.c_str())) {
262+
if (sItem == sub) {
263263
alreadyAdded = true;
264264
break;
265265
}

0 commit comments

Comments
 (0)