Fix cast from const by accessing string data directly (#8354)
[oweals/minetest.git] / src / itemdef.h
index 4c754f1da35e3ba7de47f29ea4abf43c9f49e327..45cff582a218096028f28689c04695bfe66bdee4 100644 (file)
@@ -60,7 +60,9 @@ struct ItemDefinition
                Visual properties
        */
        std::string inventory_image; // Optional for nodes, mandatory for tools/craftitems
+       std::string inventory_overlay; // Overlay of inventory_image.
        std::string wield_image; // If empty, inventory_image or mesh (only nodes) is used
+       std::string wield_overlay; // Overlay of wield_image.
        std::string palette_image; // If specified, the item will be colorized based on this
        video::SColor color; // The fallback color of the node.
        v3f wield_scale;
@@ -100,8 +102,9 @@ private:
 class IItemDefManager
 {
 public:
-       IItemDefManager(){}
-       virtual ~IItemDefManager(){}
+       IItemDefManager() = default;
+
+       virtual ~IItemDefManager() = default;
 
        // Get item definition
        virtual const ItemDefinition& get(const std::string &name) const=0;
@@ -133,8 +136,9 @@ public:
 class IWritableItemDefManager : public IItemDefManager
 {
 public:
-       IWritableItemDefManager(){}
-       virtual ~IWritableItemDefManager(){}
+       IWritableItemDefManager() = default;
+
+       virtual ~IWritableItemDefManager() = default;
 
        // Get item definition
        virtual const ItemDefinition& get(const std::string &name) const=0;