ignore this

This commit is contained in:
niczkx
2012-07-19 15:55:10 +02:00
parent f289db3a9e
commit f74b013da2
10 changed files with 67 additions and 47 deletions

View File

@@ -25,6 +25,7 @@
#include "declarations.h"
#include <framework/util/databuffer.h>
#include <otclient/position.h>
enum {
BINARYTREE_ESCAPE_CHAR = 0xFD,
@@ -48,6 +49,8 @@ public:
uint32 getU32();
uint64 getU64();
std::string getString();
Position getPosition() { return Position(getU16(), getU16(), getU8()); }
Point getPoint() { return Point(getU8(), getU8()); }
BinaryTreeVec getChildren();
bool canRead() { unserialize(); return m_pos < m_buffer.size(); }

View File

@@ -30,6 +30,7 @@
#include <iomanip>
#include <vector>
#include <boost/algorithm/string.hpp>
#include <otclient/position.h>
#include "types.h"
#include "cast.h"
@@ -180,6 +181,11 @@ inline std::string ip_to_string(uint32 ip) {
return std::string(host);
}
inline std::string pos_to_string(const Position& p)
{
return format("{x = %h, y = %h, z = %hh}", p.x, p.y, p.z);
}
/// Convert utf8 characters to latin1
inline char utf8CharToLatin1(uchar *utf8, int *read) {
char c = '?';

View File

@@ -173,7 +173,7 @@ enum TiXmlEncoding
TIXML_ENCODING_LEGACY
};
const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
constexpr TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
/** TiXmlBase is a base class for every class in TinyXml.
It does little except to establish that TinyXml classes