summaryrefslogtreecommitdiffstats
path: root/src/Protocol
diff options
context:
space:
mode:
authorLukas Pioch <lukas@zgow.de>2015-10-19 16:03:55 +0200
committertycho <work.tycho@gmail.com>2015-10-26 01:16:35 +0100
commit079bb7c0167ee87d9a10ff6862e5009f323cd714 (patch)
tree9d714f07041c9bc045f3591c3f2da2039945c80b /src/Protocol
parentDebuggers: Added a plugin channel test with funny chars in data. (diff)
downloadcuberite-079bb7c0167ee87d9a10ff6862e5009f323cd714.tar
cuberite-079bb7c0167ee87d9a10ff6862e5009f323cd714.tar.gz
cuberite-079bb7c0167ee87d9a10ff6862e5009f323cd714.tar.bz2
cuberite-079bb7c0167ee87d9a10ff6862e5009f323cd714.tar.lz
cuberite-079bb7c0167ee87d9a10ff6862e5009f323cd714.tar.xz
cuberite-079bb7c0167ee87d9a10ff6862e5009f323cd714.tar.zst
cuberite-079bb7c0167ee87d9a10ff6862e5009f323cd714.zip
Diffstat (limited to 'src/Protocol')
-rw-r--r--src/Protocol/Protocol17x.cpp8
-rw-r--r--src/Protocol/Protocol18x.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/Protocol/Protocol17x.cpp b/src/Protocol/Protocol17x.cpp
index d17537ff7..8dd608069 100644
--- a/src/Protocol/Protocol17x.cpp
+++ b/src/Protocol/Protocol17x.cpp
@@ -3222,11 +3222,11 @@ void cProtocol176::SendPlayerSpawn(const cPlayer & a_Player)
const Json::Value & Properties = a_Player.GetClientHandle()->GetProperties();
Pkt.WriteVarInt32(Properties.size());
- for (Json::Value::iterator itr = Properties.begin(), end = Properties.end(); itr != end; ++itr)
+ for (auto & Node : Properties)
{
- Pkt.WriteString(itr->get("name", "").asString());
- Pkt.WriteString(itr->get("value", "").asString());
- Pkt.WriteString(itr->get("signature", "").asString());
+ Pkt.WriteString(Node.get("name", "").asString());
+ Pkt.WriteString(Node.get("value", "").asString());
+ Pkt.WriteString(Node.get("signature", "").asString());
}
Pkt.WriteFPInt(a_Player.GetPosX());
diff --git a/src/Protocol/Protocol18x.cpp b/src/Protocol/Protocol18x.cpp
index ea71103f7..81e9bc1bc 100644
--- a/src/Protocol/Protocol18x.cpp
+++ b/src/Protocol/Protocol18x.cpp
@@ -853,11 +853,11 @@ void cProtocol180::SendPlayerListAddPlayer(const cPlayer & a_Player)
const Json::Value & Properties = a_Player.GetClientHandle()->GetProperties();
Pkt.WriteVarInt32(Properties.size());
- for (Json::Value::iterator itr = Properties.begin(), end = Properties.end(); itr != end; ++itr)
+ for (auto & Node : Properties)
{
- Pkt.WriteString(static_cast<Json::Value>(*itr).get("name", "").asString());
- Pkt.WriteString(static_cast<Json::Value>(*itr).get("value", "").asString());
- AString Signature = static_cast<Json::Value>(*itr).get("signature", "").asString();
+ Pkt.WriteString(Node.get("name", "").asString());
+ Pkt.WriteString(Node.get("value", "").asString());
+ AString Signature = Node.get("signature", "").asString();
if (Signature.empty())
{
Pkt.WriteBool(false);