summaryrefslogtreecommitdiffstats
path: root/src/WorldStorage
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2015-05-09 11:16:56 +0200
committerMattes D <github@xoft.cz>2015-05-09 12:58:55 +0200
commit846d16315a8b5a81fbc37d66da4d1254038ec494 (patch)
tree2a7c873756a3063480a64a975491bd58d9538554 /src/WorldStorage
parentMore style checking. (diff)
downloadcuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.gz
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.bz2
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.lz
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.xz
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.tar.zst
cuberite-846d16315a8b5a81fbc37d66da4d1254038ec494.zip
Diffstat (limited to 'src/WorldStorage')
-rw-r--r--src/WorldStorage/EnchantmentSerializer.cpp4
-rw-r--r--src/WorldStorage/EnchantmentSerializer.h4
-rw-r--r--src/WorldStorage/MapSerializer.cpp4
-rw-r--r--src/WorldStorage/MapSerializer.h2
-rw-r--r--src/WorldStorage/ScoreboardSerializer.cpp6
-rw-r--r--src/WorldStorage/ScoreboardSerializer.h4
-rw-r--r--src/WorldStorage/StatSerializer.h2
-rwxr-xr-xsrc/WorldStorage/WSSAnvil.cpp2
8 files changed, 14 insertions, 14 deletions
diff --git a/src/WorldStorage/EnchantmentSerializer.cpp b/src/WorldStorage/EnchantmentSerializer.cpp
index 56072207f..a6e562956 100644
--- a/src/WorldStorage/EnchantmentSerializer.cpp
+++ b/src/WorldStorage/EnchantmentSerializer.cpp
@@ -5,7 +5,7 @@
#include "Enchantments.h"
#include "FastNBT.h"
-void EnchantmentSerializer::WriteToNBTCompound(cEnchantments const& a_Enchantments, cFastNBTWriter & a_Writer, const AString & a_ListTagName)
+void EnchantmentSerializer::WriteToNBTCompound(const cEnchantments & a_Enchantments, cFastNBTWriter & a_Writer, const AString & a_ListTagName)
{
// Write the enchantments into the specified NBT writer
// begin with the LIST tag of the specified name ("ench" or "StoredEnchantments")
@@ -25,7 +25,7 @@ void EnchantmentSerializer::WriteToNBTCompound(cEnchantments const& a_Enchantmen
-void EnchantmentSerializer::ParseFromNBT(cEnchantments& a_Enchantments, const cParsedNBT & a_NBT, int a_EnchListTagIdx)
+void EnchantmentSerializer::ParseFromNBT(cEnchantments & a_Enchantments, const cParsedNBT & a_NBT, int a_EnchListTagIdx)
{
// Read the enchantments from the specified NBT list tag (ench or StoredEnchantments)
diff --git a/src/WorldStorage/EnchantmentSerializer.h b/src/WorldStorage/EnchantmentSerializer.h
index 9ed362900..7d6546aad 100644
--- a/src/WorldStorage/EnchantmentSerializer.h
+++ b/src/WorldStorage/EnchantmentSerializer.h
@@ -9,9 +9,9 @@ namespace EnchantmentSerializer
{
/// Writes the enchantments into the specified NBT writer; begins with the LIST tag of the specified name ("ench" or "StoredEnchantments")
- void WriteToNBTCompound(cEnchantments const& a_Enchantments, cFastNBTWriter & a_Writer, const AString & a_ListTagName);
+ 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)
- void ParseFromNBT(cEnchantments& a_Enchantments, const cParsedNBT & a_NBT, int a_EnchListTagIdx);
+ void ParseFromNBT(cEnchantments & a_Enchantments, const cParsedNBT & a_NBT, int a_EnchListTagIdx);
};
diff --git a/src/WorldStorage/MapSerializer.cpp b/src/WorldStorage/MapSerializer.cpp
index 6f0449041..da7b9d929 100644
--- a/src/WorldStorage/MapSerializer.cpp
+++ b/src/WorldStorage/MapSerializer.cpp
@@ -15,8 +15,8 @@
-cMapSerializer::cMapSerializer(const AString& a_WorldName, cMap * a_Map)
- : m_Map(a_Map)
+cMapSerializer::cMapSerializer(const AString & a_WorldName, cMap * a_Map):
+ m_Map(a_Map)
{
AString DataPath;
Printf(DataPath, "%s%cdata", a_WorldName.c_str(), cFile::PathSeparator);
diff --git a/src/WorldStorage/MapSerializer.h b/src/WorldStorage/MapSerializer.h
index e13a75c8f..007f1347b 100644
--- a/src/WorldStorage/MapSerializer.h
+++ b/src/WorldStorage/MapSerializer.h
@@ -26,7 +26,7 @@ class cMapSerializer
{
public:
- cMapSerializer(const AString& a_WorldName, cMap * a_Map);
+ cMapSerializer(const AString & a_WorldName, cMap * a_Map);
/** Try to load the map */
bool Load(void);
diff --git a/src/WorldStorage/ScoreboardSerializer.cpp b/src/WorldStorage/ScoreboardSerializer.cpp
index 0d8730e49..01e56dbe1 100644
--- a/src/WorldStorage/ScoreboardSerializer.cpp
+++ b/src/WorldStorage/ScoreboardSerializer.cpp
@@ -14,13 +14,13 @@
-cScoreboardSerializer::cScoreboardSerializer(const AString & a_WorldName, cScoreboard* a_ScoreBoard)
- : m_ScoreBoard(a_ScoreBoard)
+cScoreboardSerializer::cScoreboardSerializer(const AString & a_WorldName, cScoreboard * a_ScoreBoard):
+ m_ScoreBoard(a_ScoreBoard)
{
AString DataPath;
Printf(DataPath, "%s%cdata", a_WorldName.c_str(), cFile::PathSeparator);
- m_Path = DataPath + "/scoreboard.dat";
+ m_Path = DataPath + cFile::PathSeparator + "scoreboard.dat";
cFile::CreateFolder(FILE_IO_PREFIX + DataPath);
}
diff --git a/src/WorldStorage/ScoreboardSerializer.h b/src/WorldStorage/ScoreboardSerializer.h
index 048fa3ab4..f9065b35f 100644
--- a/src/WorldStorage/ScoreboardSerializer.h
+++ b/src/WorldStorage/ScoreboardSerializer.h
@@ -25,7 +25,7 @@ class cScoreboardSerializer
{
public:
- cScoreboardSerializer(const AString & a_WorldName, cScoreboard* a_ScoreBoard);
+ cScoreboardSerializer(const AString & a_WorldName, cScoreboard * a_ScoreBoard);
/// Try to load the scoreboard
bool Load(void);
@@ -40,7 +40,7 @@ private:
bool LoadScoreboardFromNBT(const cParsedNBT & a_NBT);
- cScoreboard* m_ScoreBoard;
+ cScoreboard * m_ScoreBoard;
AString m_Path;
diff --git a/src/WorldStorage/StatSerializer.h b/src/WorldStorage/StatSerializer.h
index 72f8d74f1..6b7efddbb 100644
--- a/src/WorldStorage/StatSerializer.h
+++ b/src/WorldStorage/StatSerializer.h
@@ -43,7 +43,7 @@ protected:
private:
- cStatManager* m_Manager;
+ cStatManager * m_Manager;
AString m_Path;
diff --git a/src/WorldStorage/WSSAnvil.cpp b/src/WorldStorage/WSSAnvil.cpp
index f389e7cbf..392b9bf83 100755
--- a/src/WorldStorage/WSSAnvil.cpp
+++ b/src/WorldStorage/WSSAnvil.cpp
@@ -3148,7 +3148,7 @@ bool cWSSAnvil::cMCAFile::SetChunkData(const cChunkCoords & a_Chunk, const AStri
}
// Store the header:
- ChunkSize = ((u_long)a_Data.size() + MCA_CHUNK_HEADER_LENGTH + 4095) / 4096; // Round data size *up* to nearest 4KB sector, make it a sector number
+ ChunkSize = ((u_long)a_Data.size() + MCA_CHUNK_HEADER_LENGTH + 4095) / 4096; // Round data size up to nearest 4KB sector, make it a sector number
if (ChunkSize > 255)
{
LOGWARNING("Cannot save chunk [%d, %d], the data is too large (%u KiB, maximum is 1024 KiB). Remove some entities and retry.",