summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2015-05-10 13:16:20 +0200
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2015-05-10 13:16:20 +0200
commit9c490293b88f9828577e5431c5151f7f1bec09f4 (patch)
treebe616a3c3b2db083b2f3908220818231778609ef /src/Protocol
parentFixed some warnings and logic errors in Monster.cpp (diff)
parentMerge pull request #1985 from SafwatHalaby/lessPathCalcs (diff)
downloadcuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.gz
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.bz2
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.lz
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.xz
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.tar.zst
cuberite-9c490293b88f9828577e5431c5151f7f1bec09f4.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/ChunkDataSerializer.cpp4
-rw-r--r--src/Protocol/MojangAPI.cpp4
-rw-r--r--src/Protocol/Protocol17x.cpp4
-rw-r--r--src/Protocol/Protocol18x.cpp4
4 files changed, 8 insertions, 8 deletions
diff --git a/src/Protocol/ChunkDataSerializer.cpp b/src/Protocol/ChunkDataSerializer.cpp
index 60fd5f935..2b9c06779 100644
--- a/src/Protocol/ChunkDataSerializer.cpp
+++ b/src/Protocol/ChunkDataSerializer.cpp
@@ -68,7 +68,7 @@ const AString & cChunkDataSerializer::Serialize(int a_Version, int a_ChunkX, int
void cChunkDataSerializer::Serialize29(AString & a_Data)
{
- // TODO: Do not copy data and then compress it; rather, compress partial blocks of data (zlib *can* stream)
+ // TODO: Do not copy data and then compress it; rather, compress partial blocks of data (zlib can stream)
const int BiomeDataSize = cChunkDef::Width * cChunkDef::Width;
const int MetadataOffset = sizeof(m_BlockTypes);
@@ -126,7 +126,7 @@ void cChunkDataSerializer::Serialize29(AString & a_Data)
void cChunkDataSerializer::Serialize39(AString & a_Data)
{
- // TODO: Do not copy data and then compress it; rather, compress partial blocks of data (zlib *can* stream)
+ // TODO: Do not copy data and then compress it; rather, compress partial blocks of data (zlib can stream)
const int BiomeDataSize = cChunkDef::Width * cChunkDef::Width;
const int MetadataOffset = sizeof(m_BlockTypes);
diff --git a/src/Protocol/MojangAPI.cpp b/src/Protocol/MojangAPI.cpp
index 570754204..0d1441500 100644
--- a/src/Protocol/MojangAPI.cpp
+++ b/src/Protocol/MojangAPI.cpp
@@ -659,7 +659,7 @@ void cMojangAPI::QueryNamesToUUIDs(AStringVector & a_NamesToQuery)
a_NamesToQuery.erase(a_NamesToQuery.begin(), itr);
Json::FastWriter Writer;
AString RequestBody = Writer.write(root);
-
+
// Create the HTTP request:
AString Request;
Request += "POST " + m_NameToUUIDAddress + " HTTP/1.0\r\n"; // We need to use HTTP 1.0 because we don't handle Chunked transfer encoding
@@ -667,7 +667,7 @@ void cMojangAPI::QueryNamesToUUIDs(AStringVector & a_NamesToQuery)
Request += "User-Agent: MCServer\r\n";
Request += "Connection: close\r\n";
Request += "Content-Type: application/json\r\n";
- Request += Printf("Content-Length: %u\r\n", (unsigned)RequestBody.length());
+ Request += Printf("Content-Length: %u\r\n", static_cast<unsigned>(RequestBody.length()));
Request += "\r\n";
Request += RequestBody;
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index 57631c37d..799c021f3 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -492,7 +492,7 @@ void cProtocol172::SendEntityVelocity(const cEntity & a_Entity)
cPacketizer Pkt(*this, 0x12); // Entity Velocity packet
Pkt.WriteBEUInt32(a_Entity.GetUniqueID());
- // 400 = 8000 / 20 ... Conversion from our speed in m/s to 8000 m/tick
+ // 400 = 8000 / 20 ... Conversion from our speed in m / s to 8000 m / tick
Pkt.WriteBEInt16(static_cast<short>(a_Entity.GetSpeedX() * 400));
Pkt.WriteBEInt16(static_cast<short>(a_Entity.GetSpeedY() * 400));
Pkt.WriteBEInt16(static_cast<short>(a_Entity.GetSpeedZ() * 400));
@@ -2514,7 +2514,7 @@ void cProtocol172::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
for (int loretag = NBT.GetFirstChild(displaytag); loretag >= 0; loretag = NBT.GetNextSibling(loretag)) // Loop through array of strings
{
- AppendPrintf(Lore, "%s`", NBT.GetString(loretag).c_str()); // Append the lore with a grave accent/backtick, used internally by MCS to display a new line in the client; don't forget to c_str ;)
+ AppendPrintf(Lore, "%s`", NBT.GetString(loretag).c_str()); // Append the lore with a grave accent / backtick, used internally by MCS to display a new line in the client; don't forget to c_str ;)
}
a_Item.m_Lore = Lore;
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index 628d8f528..1d83be8dd 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -479,7 +479,7 @@ void cProtocol180::SendEntityVelocity(const cEntity & a_Entity)
cPacketizer Pkt(*this, 0x12); // Entity Velocity packet
Pkt.WriteVarInt32(a_Entity.GetUniqueID());
- // 400 = 8000 / 20 ... Conversion from our speed in m/s to 8000 m/tick
+ // 400 = 8000 / 20 ... Conversion from our speed in m / s to 8000 m / tick
Pkt.WriteBEInt16((short)(a_Entity.GetSpeedX() * 400));
Pkt.WriteBEInt16((short)(a_Entity.GetSpeedY() * 400));
Pkt.WriteBEInt16((short)(a_Entity.GetSpeedZ() * 400));
@@ -2754,7 +2754,7 @@ void cProtocol180::ParseItemMetadata(cItem & a_Item, const AString & a_Metadata)
for (int loretag = NBT.GetFirstChild(displaytag); loretag >= 0; loretag = NBT.GetNextSibling(loretag)) // Loop through array of strings
{
- AppendPrintf(Lore, "%s`", NBT.GetString(loretag).c_str()); // Append the lore with a grave accent/backtick, used internally by MCS to display a new line in the client; don't forget to c_str ;)
+ AppendPrintf(Lore, "%s`", NBT.GetString(loretag).c_str()); // Append the lore with a grave accent / backtick, used internally by MCS to display a new line in the client; don't forget to c_str ;)
}
a_Item.m_Lore = Lore;