1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-07-02 16:38:41 +00:00

Cpp11 initializers: last src root changeset (#6022)

* Cpp11 initializers: last src root changeset

Finish to migrate all src root folder files to C++11 constructor initializers
This commit is contained in:
Loïc Blot 2017-06-21 11:51:29 +02:00 committed by GitHub
parent 12aad731ad
commit 1425c6def1
20 changed files with 127 additions and 223 deletions

View file

@ -28,13 +28,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
struct ToolGroupCap
{
std::unordered_map<int, float> times;
int maxlevel;
int uses;
int maxlevel = 1;
int uses = 20;
ToolGroupCap():
maxlevel(1),
uses(20)
{}
ToolGroupCap() {}
bool getTime(int rating, float *time) const
{
@ -118,15 +115,11 @@ HitParams getHitParams(const ItemGroupList &armor_groups,
struct PunchDamageResult
{
bool did_punch;
int damage;
int wear;
bool did_punch = false;
int damage = 0;
int wear = 0;
PunchDamageResult():
did_punch(false),
damage(0),
wear(0)
{}
PunchDamageResult() {}
};
struct ItemStack;