From dac1f42ef81ac1119430fd294a6b35b0b8cd6837 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 25 Jan 2015 17:45:10 +0000 Subject: - class KeyStream extracted to the separate module; - xml attributes redesigned to produce efficient code; - many small improvements git-svn-id: http://svn.miranda-ng.org/main/trunk@11905 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp') diff --git a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp index 573afb4680..16e9238a4f 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeReader.cpp @@ -5,7 +5,8 @@ * Author: Antonio */ -#include +#include "../common.h" // #TODO Remove Miranda-dependency + #include "BinTreeNodeReader.h" #include "WAException.h" #include "ProtocolTreeNode.h" @@ -69,13 +70,13 @@ ProtocolTreeNode* BinTreeNodeReader::nextTreeInternal() int attribCount = (size - 2 + size % 2) / 2; std::map* attribs = readAttributes(attribCount); if (size % 2 == 1) { - ProtocolTreeNode* ret = new ProtocolTreeNode(*tag, attribs); + ProtocolTreeNode* ret = new ProtocolTreeNode(*tag); ret->attributes = attribs; delete tag; return ret; } b = this->in->read(); if (isListTag(b)) { - ProtocolTreeNode* ret = new ProtocolTreeNode(*tag, attribs, NULL, readList(b)); + ProtocolTreeNode* ret = new ProtocolTreeNode(*tag, NULL, readList(b)); ret->attributes = attribs; delete tag; return ret; } @@ -91,7 +92,7 @@ ProtocolTreeNode* BinTreeNodeReader::nextTreeInternal() data = (std::vector*) obj->data; } - ProtocolTreeNode* ret = new ProtocolTreeNode(*tag, attribs, data); + ProtocolTreeNode* ret = new ProtocolTreeNode(*tag, data); ret->attributes = attribs; delete obj; delete tag; return ret; -- cgit v1.2.3