From cba828384d991bc153c1c3b256252f430376191a Mon Sep 17 00:00:00 2001 From: scribam Date: Sat, 8 Jun 2019 09:06:35 +0200 Subject: [PATCH] rsx: Apply Clang-Tidy fix "modernize-pass-by-value" --- rpcs3/Emu/RSX/Common/ProgramStateCache.h | 8 ++++---- rpcs3/Emu/RSX/Common/ShaderParam.h | 10 +++++----- rpcs3/Emu/RSX/Common/texture_cache.h | 4 ++-- rpcs3/Emu/RSX/Common/texture_cache_predictor.h | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/rpcs3/Emu/RSX/Common/ProgramStateCache.h b/rpcs3/Emu/RSX/Common/ProgramStateCache.h index 88271e2c8f..4fb7cf7d14 100644 --- a/rpcs3/Emu/RSX/Common/ProgramStateCache.h +++ b/rpcs3/Emu/RSX/Common/ProgramStateCache.h @@ -146,8 +146,8 @@ public: const fragment_program_type& fp; pipeline_properties props; - async_link_task_entry(const vertex_program_type& _V, const fragment_program_type& _F, const pipeline_properties& _P) - : vp(_V), fp(_F), props(_P) + async_link_task_entry(const vertex_program_type& _V, const fragment_program_type& _F, pipeline_properties _P) + : vp(_V), fp(_F), props(std::move(_P)) {} }; @@ -159,8 +159,8 @@ public: std::vector tmp_cache; - async_decompile_task_entry(const RSXVertexProgram& _V) - : vp(_V), is_fp(false) + async_decompile_task_entry(RSXVertexProgram _V) + : vp(std::move(_V)), is_fp(false) { } diff --git a/rpcs3/Emu/RSX/Common/ShaderParam.h b/rpcs3/Emu/RSX/Common/ShaderParam.h index 2d60ac1db0..f8f9d5bc55 100644 --- a/rpcs3/Emu/RSX/Common/ShaderParam.h +++ b/rpcs3/Emu/RSX/Common/ShaderParam.h @@ -71,9 +71,9 @@ struct ParamItem const std::string value; int location; - ParamItem(const std::string& _name, int _location, const std::string& _value = "") - : name(_name) - , value(_value), + ParamItem(std::string _name, int _location, std::string _value = "") + : name(std::move(_name)) + , value(std::move(_value)), location(_location) { } }; @@ -84,9 +84,9 @@ struct ParamType const std::string type; std::vector items; - ParamType(const ParamFlag _flag, const std::string& _type) + ParamType(const ParamFlag _flag, std::string _type) : flag(_flag) - , type(_type) + , type(std::move(_type)) { } diff --git a/rpcs3/Emu/RSX/Common/texture_cache.h b/rpcs3/Emu/RSX/Common/texture_cache.h index d26b318f02..98f31d93bd 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache.h +++ b/rpcs3/Emu/RSX/Common/texture_cache.h @@ -183,8 +183,8 @@ namespace rsx deferred_subresource() {} - deferred_subresource(image_resource_type _res, deferred_request_command _op, u32 _addr, u32 _fmt, u16 _x, u16 _y, u16 _w, u16 _h, u16 _d, const texture_channel_remap_t& _remap) : - external_handle(_res), op(_op), base_address(_addr), gcm_format(_fmt), x(_x), y(_y), width(_w), height(_h), depth(_d), remap(_remap) + deferred_subresource(image_resource_type _res, deferred_request_command _op, u32 _addr, u32 _fmt, u16 _x, u16 _y, u16 _w, u16 _h, u16 _d, texture_channel_remap_t _remap) : + external_handle(_res), op(_op), base_address(_addr), gcm_format(_fmt), x(_x), y(_y), width(_w), height(_h), depth(_d), remap(std::move(_remap)) {} }; diff --git a/rpcs3/Emu/RSX/Common/texture_cache_predictor.h b/rpcs3/Emu/RSX/Common/texture_cache_predictor.h index 5cc7bb29e5..cc67193089 100644 --- a/rpcs3/Emu/RSX/Common/texture_cache_predictor.h +++ b/rpcs3/Emu/RSX/Common/texture_cache_predictor.h @@ -139,7 +139,7 @@ namespace rsx public: texture_cache_predictor_entry(key_type _key) - : key(_key) + : key(std::move(_key)) { reset(); }