mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Simplify std::find
with Common::Contains
In NandPaths.cpp, the `std::initializer_list<char>` of illegal characters has been turned into a `char[]` (similar to the one in GameList.cpp). The reverse iteration in ResourcePack.cpp seemed to provide no benefits, and doing without it it seemed to have no ill effects.
This commit is contained in:
parent
202f169138
commit
cc16346d8f
16 changed files with 43 additions and 51 deletions
|
@ -22,6 +22,7 @@
|
|||
#include "AudioCommon/AudioCommon.h"
|
||||
|
||||
#include "Common/Config/Config.h"
|
||||
#include "Common/Contains.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
|
@ -297,7 +298,7 @@ void Settings::AddPath(const QString& qpath)
|
|||
std::string path = qpath.toStdString();
|
||||
std::vector<std::string> paths = Config::GetIsoPaths();
|
||||
|
||||
if (std::find(paths.begin(), paths.end(), path) != paths.end())
|
||||
if (Common::Contains(paths, path))
|
||||
return;
|
||||
|
||||
paths.emplace_back(path);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue