From 6e4122e551eeb41d3e950b363dd837d5586fe560 Mon Sep 17 00:00:00 2001 From: Mattes D Date: Fri, 31 Jul 2015 16:49:10 +0200 Subject: Unified the doxy-comment format. --- src/WorldStorage/EnchantmentSerializer.h | 12 ++++++++++-- src/WorldStorage/NBTChunkSerializer.h | 9 ++++----- src/WorldStorage/ScoreboardSerializer.h | 4 ++-- src/WorldStorage/WSSAnvil.cpp | 2 +- src/WorldStorage/WorldStorage.cpp | 2 +- src/WorldStorage/WorldStorage.h | 21 +++++++++++---------- 6 files changed, 29 insertions(+), 21 deletions(-) (limited to 'src/WorldStorage') diff --git a/src/WorldStorage/EnchantmentSerializer.h b/src/WorldStorage/EnchantmentSerializer.h index 7d6546aad..5c12e01bc 100644 --- a/src/WorldStorage/EnchantmentSerializer.h +++ b/src/WorldStorage/EnchantmentSerializer.h @@ -5,13 +5,21 @@ class cEnchantments; class cFastNBTWriter; class cParsedNBT; + + + + namespace EnchantmentSerializer { - /// Writes the enchantments into the specified NBT writer; begins with the LIST tag of the specified name ("ench" or "StoredEnchantments") + /** Writes the enchantments into the specified NBT writer; begins with the LIST tag of the specified name ("ench" or "StoredEnchantments") */ void WriteToNBTCompound(const cEnchantments & a_Enchantments, cFastNBTWriter & a_Writer, const AString & a_ListTagName); - /// Reads the enchantments from the specified NBT list tag (ench or StoredEnchantments) + /** Reads the enchantments from the specified NBT list tag (ench or StoredEnchantments) */ void ParseFromNBT(cEnchantments & a_Enchantments, const cParsedNBT & a_NBT, int a_EnchListTagIdx); }; + + + + diff --git a/src/WorldStorage/NBTChunkSerializer.h b/src/WorldStorage/NBTChunkSerializer.h index f30cd59d5..956738911 100644 --- a/src/WorldStorage/NBTChunkSerializer.h +++ b/src/WorldStorage/NBTChunkSerializer.h @@ -67,7 +67,7 @@ public: cNBTChunkSerializer(cFastNBTWriter & a_Writer); - /// Close NBT tags that we've opened + /** Close NBT tags that we've opened */ void Finish(void); bool IsLightValid(void) const {return m_IsLightValid; } @@ -78,8 +78,7 @@ protected: - m_BlockTypes[] - m_BlockMetas[] - m_BlockLight[] - - m_BlockSkyLight[] - */ + - m_BlockSkyLight[] */ cFastNBTWriter & m_Writer; @@ -89,10 +88,10 @@ protected: bool m_IsLightValid; // True if the chunk lighting is valid - /// Writes an item into the writer, if slot >= 0, adds the Slot tag. The compound is named as requested. + /** Writes an item into the writer, if slot >= 0, adds the Slot tag. The compound is named as requested. */ void AddItem(const cItem & a_Item, int a_Slot, const AString & a_CompoundName = ""); - /// Writes an item grid into the writer; begins the stored slot numbers with a_BeginSlotNum. Note that it doesn't begin nor end the list tag + /** Writes an item grid into the writer; begins the stored slot numbers with a_BeginSlotNum. Note that it doesn't begin nor end the list tag */ void AddItemGrid(const cItemGrid & a_Grid, int a_BeginSlotNum = 0); // Block entities: diff --git a/src/WorldStorage/ScoreboardSerializer.h b/src/WorldStorage/ScoreboardSerializer.h index f9065b35f..8b3a2c8b6 100644 --- a/src/WorldStorage/ScoreboardSerializer.h +++ b/src/WorldStorage/ScoreboardSerializer.h @@ -27,10 +27,10 @@ public: cScoreboardSerializer(const AString & a_WorldName, cScoreboard * a_ScoreBoard); - /// Try to load the scoreboard + /** Try to load the scoreboard */ bool Load(void); - /// Try to save the scoreboard + /** Try to save the scoreboard */ bool Save(void); diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp index 4eb10fcc8..dc1b7faff 100755 --- a/src/WorldStorage/WSSAnvil.cpp +++ b/src/WorldStorage/WSSAnvil.cpp @@ -1585,7 +1585,7 @@ void cWSSAnvil::LoadFallingBlockFromNBT(cEntityList & a_Entities, const cParsedN return; } - int Type = a_NBT.GetInt(TypeIdx); + BLOCKTYPE Type = static_cast(a_NBT.GetInt(TypeIdx)); NIBBLETYPE Meta = static_cast(a_NBT.GetByte(MetaIdx)); std::unique_ptr FallingBlock = cpp14::make_unique(Vector3i(0, 0, 0), Type, Meta); diff --git a/src/WorldStorage/WorldStorage.cpp b/src/WorldStorage/WorldStorage.cpp index 7e6cadb7e..19fc2be56 100644 --- a/src/WorldStorage/WorldStorage.cpp +++ b/src/WorldStorage/WorldStorage.cpp @@ -16,7 +16,7 @@ -/// Example storage schema - forgets all chunks ;) +/** Example storage schema - forgets all chunks */ class cWSSForgetful : public cWSSchema { diff --git a/src/WorldStorage/WorldStorage.h b/src/WorldStorage/WorldStorage.h index e9ba2a8e2..70cca9031 100644 --- a/src/WorldStorage/WorldStorage.h +++ b/src/WorldStorage/WorldStorage.h @@ -31,7 +31,7 @@ typedef cQueue cChunkCoordsQueue; -/// Interface that all the world storage schemas need to implement +/** Interface that all the world storage schemas need to implement */ class cWSSchema abstract { public: @@ -53,7 +53,7 @@ typedef std::list cWSSchemaList; -/// The actual world storage class +/** The actual world storage class */ class cWorldStorage : public cIsThread { @@ -87,26 +87,27 @@ protected: cChunkCoordsQueue m_LoadQueue; cChunkCoordsQueue m_SaveQueue; - /// All the storage schemas (all used for loading) + /** All the storage schemas (all used for loading) */ cWSSchemaList m_Schemas; - /// The one storage schema used for saving - cWSSchema * m_SaveSchema; + /** The one storage schema used for saving */ + cWSSchema * m_SaveSchema; + + /** Set when there's any addition to the queues */ + cEvent m_Event; - /// Loads the chunk specified; returns true on success, false on failure + /** Loads the chunk specified; returns true on success, false on failure */ bool LoadChunk(int a_ChunkX, int a_ChunkZ); void InitSchemas(int a_StorageCompressionFactor); virtual void Execute(void) override; - cEvent m_Event; // Set when there's any addition to the queues - - /// Loads one chunk from the queue (if any queued); returns true if there are more chunks in the load queue + /** Loads one chunk from the queue (if any queued); returns true if there are more chunks in the load queue */ bool LoadOneChunk(void); - /// Saves one chunk from the queue (if any queued); returns true if there are more chunks in the save queue + /** Saves one chunk from the queue (if any queued); returns true if there are more chunks in the save queue */ bool SaveOneChunk(void); } ; -- cgit v1.2.3