diff options
author | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:33:42 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-08-11 13:33:42 +0000 |
commit | 85bd008c039eb1d93894e94fba9d158a42a71a12 (patch) | |
tree | 2d72d10759f6928e9e4b960175d2de01b5cf7e12 /protocols/Xfire/src/xfireclanpacket.cpp | |
parent | 222802c2986dcaf029fdfb828b7679bdabfa7bb2 (diff) |
massive code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14910 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Xfire/src/xfireclanpacket.cpp')
-rw-r--r-- | protocols/Xfire/src/xfireclanpacket.cpp | 72 |
1 files changed, 34 insertions, 38 deletions
diff --git a/protocols/Xfire/src/xfireclanpacket.cpp b/protocols/Xfire/src/xfireclanpacket.cpp index c26577fae1..2bc6796572 100644 --- a/protocols/Xfire/src/xfireclanpacket.cpp +++ b/protocols/Xfire/src/xfireclanpacket.cpp @@ -26,54 +26,50 @@ #include "xfireclanpacket.h" #include "variablevalue.h" -#include <string> -namespace xfirelib { - using namespace std; +using namespace std; - void XFireClanPacket::parseContent(char *buf, int nlength, int numberOfAtts) { - VariableValue val; - int index = 0; - int length = 0; - string stringvalue; - - index += 3; // ersten 5 bytes skippen +namespace xfirelib +{ + void XFireClanPacket::parseContent(char *buf, int, int) + { + VariableValue val; + int index = 0; + int length = 0; + string stringvalue; - this->count=(char)buf[index]; + index += 3; // ersten 5 bytes skippen - index += 2; + this->count = (char)buf[index]; - for(int i=0;i<this->count;i++) - { - index += val.readValue(buf,index,2); //clanid lesen - this->clanid[i] = val.getValueAsLong(); index += 2; - } - - index += 5; // 7 bytes skippen - for(int i=0;i<this->count;i++) - { - length = (unsigned char)buf[index++]; //clannamen lesen - index++; - index += val.readValue(buf,index,length); - stringvalue = string(val.getValue(),length); + for (int i = 0; i < this->count; i++) { + index += val.readValue(buf, index, 2); //clanid lesen + this->clanid[i] = val.getValueAsLong(); + index += 2; + } - this->name[i] = stringvalue; - } + index += 5; // 7 bytes skippen - index += 5; // 5 skippen + for (int i = 0; i < this->count; i++) { + length = (unsigned char)buf[index++]; //clannamen lesen + index++; + index += val.readValue(buf, index, length); + stringvalue = string(val.getValue(), length); - for(int i=0;i<this->count;i++) - { - length = (unsigned char)buf[index++]; //url anhängsel auslesen - index++; - index += val.readValue(buf,index,length); - stringvalue = string(val.getValue(),length); + this->name[i] = stringvalue; + } - this->url[i] = stringvalue; - } + index += 5; // 5 skippen - } + for (int i = 0; i < this->count; i++) { + length = (unsigned char)buf[index++]; //url anhängsel auslesen + index++; + index += val.readValue(buf, index, length); + stringvalue = string(val.getValue(), length); -}; + this->url[i] = stringvalue; + } + } +} |