mirror of
https://github.com/yuzu-emu/yuzu-mainline.git
synced 2024-12-23 17:25:30 +00:00
sdl_impl: Make use of std::move on std::string where applicable
Avoids redundant copies.
This commit is contained in:
parent
e92164e6a0
commit
f2a680ca89
|
@ -577,7 +577,7 @@ Common::ParamPackage BuildAnalogParamPackageForButton(int port, std::string guid
|
||||||
float value = 0.1f) {
|
float value = 0.1f) {
|
||||||
Common::ParamPackage params({{"engine", "sdl"}});
|
Common::ParamPackage params({{"engine", "sdl"}});
|
||||||
params.Set("port", port);
|
params.Set("port", port);
|
||||||
params.Set("guid", guid);
|
params.Set("guid", std::move(guid));
|
||||||
params.Set("axis", axis);
|
params.Set("axis", axis);
|
||||||
if (value > 0) {
|
if (value > 0) {
|
||||||
params.Set("direction", "+");
|
params.Set("direction", "+");
|
||||||
|
@ -592,7 +592,7 @@ Common::ParamPackage BuildAnalogParamPackageForButton(int port, std::string guid
|
||||||
Common::ParamPackage BuildButtonParamPackageForButton(int port, std::string guid, u8 button) {
|
Common::ParamPackage BuildButtonParamPackageForButton(int port, std::string guid, u8 button) {
|
||||||
Common::ParamPackage params({{"engine", "sdl"}});
|
Common::ParamPackage params({{"engine", "sdl"}});
|
||||||
params.Set("port", port);
|
params.Set("port", port);
|
||||||
params.Set("guid", guid);
|
params.Set("guid", std::move(guid));
|
||||||
params.Set("button", button);
|
params.Set("button", button);
|
||||||
return params;
|
return params;
|
||||||
}
|
}
|
||||||
|
@ -601,7 +601,7 @@ Common::ParamPackage BuildHatParamPackageForButton(int port, std::string guid, u
|
||||||
Common::ParamPackage params({{"engine", "sdl"}});
|
Common::ParamPackage params({{"engine", "sdl"}});
|
||||||
|
|
||||||
params.Set("port", port);
|
params.Set("port", port);
|
||||||
params.Set("guid", guid);
|
params.Set("guid", std::move(guid));
|
||||||
params.Set("hat", hat);
|
params.Set("hat", hat);
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case SDL_HAT_UP:
|
case SDL_HAT_UP:
|
||||||
|
|
Loading…
Reference in a new issue