mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Core: Get rid of a few c_str/strlen calls
This commit is contained in:
parent
c1084b6b93
commit
cd26b200b2
2 changed files with 3 additions and 3 deletions
|
@ -1271,8 +1271,8 @@ int SavedataParam::SetPspParam(SceUtilitySavedataParam *param)
|
|||
std::string gameName = GetGameName(param);
|
||||
std::string saveName = "";
|
||||
for(auto it = allSaves.begin(); it != allSaves.end(); ++it) {
|
||||
if(strncmp(it->name.c_str(),gameName.c_str(),strlen(gameName.c_str())) == 0) {
|
||||
saveName = it->name.substr(strlen(gameName.c_str()));
|
||||
if(it->name.compare(0, gameName.length(), gameName) == 0) {
|
||||
saveName = it->name.substr(gameName.length());
|
||||
|
||||
if(IsInSaveDataList(saveName, realCount)) // Already in SaveDataList, skip...
|
||||
continue;
|
||||
|
|
|
@ -88,7 +88,7 @@ void VirtualDiscFileSystem::LoadFileListIndex() {
|
|||
line = line.substr(3);
|
||||
}
|
||||
|
||||
if (strlen(line.data()) < 1 || line[0] == ';') {
|
||||
if (line.empty() || line[0] == ';') {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue