From 85bd008c039eb1d93894e94fba9d158a42a71a12 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 11 Aug 2015 13:33:42 +0000 Subject: massive code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@14910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Xfire/src/sendkeepalivepacket.cpp | 44 ++++++++++++++--------------- 1 file changed, 21 insertions(+), 23 deletions(-) (limited to 'protocols/Xfire/src/sendkeepalivepacket.cpp') diff --git a/protocols/Xfire/src/sendkeepalivepacket.cpp b/protocols/Xfire/src/sendkeepalivepacket.cpp index 242ba88214..9a9af9ed05 100644 --- a/protocols/Xfire/src/sendkeepalivepacket.cpp +++ b/protocols/Xfire/src/sendkeepalivepacket.cpp @@ -24,33 +24,31 @@ #include "sendkeepalivepacket.h" #include "variablevalue.h" -#include -namespace xfirelib { +namespace xfirelib +{ + int SendKeepAlivePacket::getPacketContent(char *buf) + { + int index = 0; - int SendKeepAlivePacket::getPacketContent(char *buf) { - int index = 0; + VariableValue val; + val.setName("value"); - VariableValue val; - val.setName("value"); + index += val.writeName(buf, index); + buf[index++] = 2; + buf[index++] = 0; + buf[index++] = 0; + buf[index++] = 0; + buf[index++] = 0; - index += val.writeName(buf,index); - buf[index++] = 2; - buf[index++] = 0; - buf[index++] = 0; - buf[index++] = 0; - buf[index++] = 0; - - val.setName("stats"); - - index += val.writeName(buf,index); - buf[index++] = 4; - buf[index++] = 2; - buf[index++] = 0; - buf[index++] = 0; - - return index; - } + val.setName("stats"); + index += val.writeName(buf, index); + buf[index++] = 4; + buf[index++] = 2; + buf[index++] = 0; + buf[index++] = 0; + return index; + } }; -- cgit v1.2.3