From ae5c0e255352b3023da31c94644e88fd965db0d7 Mon Sep 17 00:00:00 2001 From: dcvz Date: Tue, 14 May 2024 02:46:17 +0200 Subject: [PATCH] Use rvalue where necessary and const where used --- include/recomp_port.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/recomp_port.h b/include/recomp_port.h index 13dfe92..9c4b11b 100644 --- a/include/recomp_port.h +++ b/include/recomp_port.h @@ -44,7 +44,7 @@ namespace RecompPort { std::string func_name; uint32_t size_bytes; - FunctionSize(std::string func_name, uint32_t size_bytes) : func_name(std::move(func_name)), size_bytes(size_bytes) {} + FunctionSize(const std::string& func_name, uint32_t size_bytes) : func_name(func_name), size_bytes(size_bytes) {} }; struct ManualFunction { @@ -53,7 +53,7 @@ namespace RecompPort { uint32_t vram; uint32_t size; - ManualFunction(std::string func_name, std::string section_name, uint32_t vram, uint32_t size) : func_name(std::move(func_name)), section_name(std::move(section_name)), vram(vram), size(size) {} + ManualFunction(const std::string& func_name, std::string section_name, uint32_t vram, uint32_t size) : func_name(func_name), section_name(std::move(section_name)), vram(vram), size(size) {} }; struct Config { @@ -88,7 +88,7 @@ namespace RecompPort { uint32_t jr_vram; std::vector entries; - JumpTable(uint32_t vram, uint32_t addend_reg, uint32_t rom, uint32_t lw_vram, uint32_t addu_vram, uint32_t jr_vram, std::vector entries) + JumpTable(uint32_t vram, uint32_t addend_reg, uint32_t rom, uint32_t lw_vram, uint32_t addu_vram, uint32_t jr_vram, std::vector&& entries) : vram(vram), addend_reg(addend_reg), rom(rom), lw_vram(lw_vram), addu_vram(addu_vram), jr_vram(jr_vram), entries(std::move(entries)) {} };