From 6ccb5835ff55d85156be91473c598eca9d6cb9a6 Mon Sep 17 00:00:00 2001 From: Elias Fleckenstein Date: Wed, 4 Nov 2020 16:57:41 +0100 Subject: Revert "Make Lint Happy" This reverts commit ad148587dcf5244c2d2011dba339786c765c54c4. --- src/itemdef.h | 70 +++++++++++++++++++++++++++++------------------------------ 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'src/itemdef.h') diff --git a/src/itemdef.h b/src/itemdef.h index e6170d150..f47e6cbe7 100644 --- a/src/itemdef.h +++ b/src/itemdef.h @@ -54,7 +54,7 @@ struct ItemDefinition Basic item properties */ ItemType type; - std::string name; // "" = hand + std::string name; // "" = hand std::string description; // Shown in tooltip. /* @@ -64,9 +64,8 @@ struct ItemDefinition 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. + 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; /* @@ -92,12 +91,11 @@ struct ItemDefinition */ ItemDefinition(); ItemDefinition(const ItemDefinition &def); - ItemDefinition &operator=(const ItemDefinition &def); + ItemDefinition& operator=(const ItemDefinition &def); ~ItemDefinition(); void reset(); void serialize(std::ostream &os, u16 protocol_version) const; void deSerialize(std::istream &is); - private: void resetInitial(); }; @@ -110,28 +108,30 @@ public: virtual ~IItemDefManager() = default; // Get item definition - virtual const ItemDefinition &get(const std::string &name) const = 0; + virtual const ItemDefinition& get(const std::string &name) const=0; // Get alias definition - virtual const std::string &getAlias(const std::string &name) const = 0; + virtual const std::string &getAlias(const std::string &name) const=0; // Get set of all defined item names and aliases - virtual void getAll(std::set &result) const = 0; + virtual void getAll(std::set &result) const=0; // Check if item is known - virtual bool isKnown(const std::string &name) const = 0; + virtual bool isKnown(const std::string &name) const=0; #ifndef SERVER // Get item inventory texture - virtual video::ITexture *getInventoryTexture( - const std::string &name, Client *client) const = 0; + virtual video::ITexture* getInventoryTexture(const std::string &name, + Client *client) const=0; // Get item wield mesh - virtual ItemMesh *getWieldMesh(const std::string &name, Client *client) const = 0; + virtual ItemMesh* getWieldMesh(const std::string &name, + Client *client) const=0; // Get item palette - virtual Palette *getPalette(const std::string &name, Client *client) const = 0; + virtual Palette* getPalette(const std::string &name, + Client *client) const = 0; // Returns the base color of an item stack: the color of all // tiles that do not define their own color. - virtual video::SColor getItemstackColor( - const ItemStack &stack, Client *client) const = 0; + virtual video::SColor getItemstackColor(const ItemStack &stack, + Client *client) const = 0; #endif - virtual void serialize(std::ostream &os, u16 protocol_version) = 0; + virtual void serialize(std::ostream &os, u16 protocol_version)=0; }; class IWritableItemDefManager : public IItemDefManager @@ -142,43 +142,43 @@ public: virtual ~IWritableItemDefManager() = default; // Get item definition - virtual const ItemDefinition &get(const std::string &name) const = 0; + virtual const ItemDefinition& get(const std::string &name) const=0; // Get alias definition - virtual const std::string &getAlias(const std::string &name) const = 0; + virtual const std::string &getAlias(const std::string &name) const=0; // Get set of all defined item names and aliases - virtual void getAll(std::set &result) const = 0; + virtual void getAll(std::set &result) const=0; // Check if item is known - virtual bool isKnown(const std::string &name) const = 0; + virtual bool isKnown(const std::string &name) const=0; #ifndef SERVER // Get item inventory texture - virtual video::ITexture *getInventoryTexture( - const std::string &name, Client *client) const = 0; + virtual video::ITexture* getInventoryTexture(const std::string &name, + Client *client) const=0; // Get item wield mesh - virtual ItemMesh *getWieldMesh(const std::string &name, Client *client) const = 0; + virtual ItemMesh* getWieldMesh(const std::string &name, + Client *client) const=0; #endif // Replace the textures of registered nodes with the ones specified in // the texture pack's override.txt files - virtual void applyTextureOverrides( - const std::vector &overrides) = 0; + virtual void applyTextureOverrides(const std::vector &overrides)=0; // Remove all registered item and node definitions and aliases // Then re-add the builtin item definitions - virtual void clear() = 0; + virtual void clear()=0; // Register item definition - virtual void registerItem(const ItemDefinition &def) = 0; - virtual void unregisterItem(const std::string &name) = 0; + virtual void registerItem(const ItemDefinition &def)=0; + virtual void unregisterItem(const std::string &name)=0; // Set an alias so that items named will load as . // Alias is not set if has already been defined. // Alias will be removed if is defined at a later point of time. - virtual void registerAlias( - const std::string &name, const std::string &convert_to) = 0; + virtual void registerAlias(const std::string &name, + const std::string &convert_to)=0; - virtual void serialize(std::ostream &os, u16 protocol_version) = 0; - virtual void deSerialize(std::istream &is) = 0; + virtual void serialize(std::ostream &os, u16 protocol_version)=0; + virtual void deSerialize(std::istream &is)=0; // Do stuff asked by threads that can only be done in the main thread - virtual void processQueue(IGameDef *gamedef) = 0; + virtual void processQueue(IGameDef *gamedef)=0; }; -IWritableItemDefManager *createItemDefManager(); +IWritableItemDefManager* createItemDefManager(); -- cgit v1.2.3