diff options
author | Mattes D <github@xoft.cz> | 2015-10-26 07:41:07 +0100 |
---|---|---|
committer | Mattes D <github@xoft.cz> | 2015-10-26 07:41:07 +0100 |
commit | 1a2cc9e497c924bf9636836c04f74c1c102f9e97 (patch) | |
tree | 9d714f07041c9bc045f3591c3f2da2039945c80b /src/Protocol/Protocol18x.cpp | |
parent | Debuggers: Added a plugin channel test with funny chars in data. (diff) | |
parent | Update Loops required for JsonCPP (diff) | |
download | cuberite-1a2cc9e497c924bf9636836c04f74c1c102f9e97.tar cuberite-1a2cc9e497c924bf9636836c04f74c1c102f9e97.tar.gz cuberite-1a2cc9e497c924bf9636836c04f74c1c102f9e97.tar.bz2 cuberite-1a2cc9e497c924bf9636836c04f74c1c102f9e97.tar.lz cuberite-1a2cc9e497c924bf9636836c04f74c1c102f9e97.tar.xz cuberite-1a2cc9e497c924bf9636836c04f74c1c102f9e97.tar.zst cuberite-1a2cc9e497c924bf9636836c04f74c1c102f9e97.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Protocol/Protocol18x.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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); |