diff options
author | Loïc Blot <nerzhul@users.noreply.github.com> | 2017-08-20 19:37:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-20 19:37:29 +0200 |
commit | ae9b5e00989756bb676429530dfe81039009001c (patch) | |
tree | 119c9ac4b886c24d42f418e21e4175a942eb95ff /src/inventory.h | |
parent | c8d3d1133945138108aa195e6b3c93b07c6e4fa0 (diff) | |
download | minetest-ae9b5e00989756bb676429530dfe81039009001c.tar.gz minetest-ae9b5e00989756bb676429530dfe81039009001c.tar.bz2 minetest-ae9b5e00989756bb676429530dfe81039009001c.zip |
Modernize code: very last fixes (#6290)
Last modernization fixes
Diffstat (limited to 'src/inventory.h')
-rw-r--r-- | src/inventory.h | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/inventory.h b/src/inventory.h index 459228d3e..d04dc1e69 100644 --- a/src/inventory.h +++ b/src/inventory.h @@ -32,11 +32,12 @@ struct ToolCapabilities; struct ItemStack { - ItemStack() {} + ItemStack() = default; + ItemStack(const std::string &name_, u16 count_, u16 wear, IItemDefManager *itemdef); - ~ItemStack() {} + ~ItemStack() = default; // Serialization void serialize(std::ostream &os) const; @@ -132,10 +133,8 @@ struct ItemStack wear += amount; return true; } - else - { - return false; - } + + return false; } // If possible, adds newitem to this item. |