Use rvalue where necessary and const where used
This commit is contained in:
parent
14f60f3520
commit
ae5c0e2553
|
@ -44,7 +44,7 @@ namespace RecompPort {
|
||||||
std::string func_name;
|
std::string func_name;
|
||||||
uint32_t size_bytes;
|
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 {
|
struct ManualFunction {
|
||||||
|
@ -53,7 +53,7 @@ namespace RecompPort {
|
||||||
uint32_t vram;
|
uint32_t vram;
|
||||||
uint32_t size;
|
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 {
|
struct Config {
|
||||||
|
@ -88,7 +88,7 @@ namespace RecompPort {
|
||||||
uint32_t jr_vram;
|
uint32_t jr_vram;
|
||||||
std::vector<uint32_t> entries;
|
std::vector<uint32_t> 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<uint32_t> 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<uint32_t>&& 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)) {}
|
: vram(vram), addend_reg(addend_reg), rom(rom), lw_vram(lw_vram), addu_vram(addu_vram), jr_vram(jr_vram), entries(std::move(entries)) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue