mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-06-13 00:58:29 +02: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:
@ -18,6 +18,7 @@
|
||||
#include <jni.h>
|
||||
|
||||
#include "Common/Assert.h"
|
||||
#include "Common/Contains.h"
|
||||
#include "Common/Logging/Log.h"
|
||||
#include "Common/StringUtil.h"
|
||||
|
||||
@ -1132,8 +1133,7 @@ Java_org_dolphinemu_dolphinemu_features_input_model_ControllerInterface_notifySe
|
||||
|
||||
for (ciface::Core::Device::Input* input : device->Inputs())
|
||||
{
|
||||
const std::string input_name = input->GetName();
|
||||
if (std::find(axis_names.begin(), axis_names.end(), input_name) != axis_names.end())
|
||||
if (Common::Contains(axis_names, input->GetName()))
|
||||
{
|
||||
auto casted_input = static_cast<ciface::Android::AndroidSensorAxis*>(input);
|
||||
casted_input->NotifyIsSuspended(static_cast<bool>(suspended));
|
||||
|
Reference in New Issue
Block a user