mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-22 17:18:39 +00:00
Fix various copy instead of const ref reported by cppcheck (#5615)
* Also remove InventoryList::peekItem unused function * Fix some post increment to preincrement reported by cppcheck
This commit is contained in:
parent
cfe0291b13
commit
f3fe62a0bf
13 changed files with 46 additions and 68 deletions
|
@ -97,7 +97,7 @@ struct CraftOutput
|
|||
CraftOutput():
|
||||
item(""), time(0)
|
||||
{}
|
||||
CraftOutput(std::string item_, float time_):
|
||||
CraftOutput(const std::string &item_, float time_):
|
||||
item(item_), time(time_)
|
||||
{}
|
||||
std::string dump() const;
|
||||
|
@ -124,7 +124,7 @@ struct CraftReplacements
|
|||
CraftReplacements():
|
||||
pairs()
|
||||
{}
|
||||
CraftReplacements(std::vector<std::pair<std::string, std::string> > pairs_):
|
||||
CraftReplacements(const std::vector<std::pair<std::string, std::string> > &pairs_):
|
||||
pairs(pairs_)
|
||||
{}
|
||||
std::string dump() const;
|
||||
|
@ -359,10 +359,13 @@ public:
|
|||
CraftDefinitionFuel():
|
||||
recipe(""), hash_inited(false), burntime()
|
||||
{}
|
||||
CraftDefinitionFuel(std::string recipe_,
|
||||
CraftDefinitionFuel(const std::string &recipe_,
|
||||
float burntime_,
|
||||
const CraftReplacements &replacements_):
|
||||
recipe(recipe_), hash_inited(false), burntime(burntime_), replacements(replacements_)
|
||||
recipe(recipe_),
|
||||
hash_inited(false),
|
||||
burntime(burntime_),
|
||||
replacements(replacements_)
|
||||
{}
|
||||
virtual ~CraftDefinitionFuel(){}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue