diff options
| author | George Hazan <george.hazan@gmail.com> | 2013-06-24 12:35:43 +0000 | 
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2013-06-24 12:35:43 +0000 | 
| commit | 9d62e31863057f847b56e82e3880c4c588c9cb0a (patch) | |
| tree | 81215235f7bc58bdc549cf12522cf39150597cd3 /protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp | |
| parent | dc2a9c66749ef4c8c6a748218bf80b80d0bbe0d6 (diff) | |
warning fix
git-svn-id: http://svn.miranda-ng.org/main/trunk@5118 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp')
| -rw-r--r-- | protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp | 16 | 
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp index d50a4a91e5..63428f7821 100644 --- a/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp +++ b/protocols/WhatsApp/src/WhatsAPI++/BinTreeNodeWriter.cpp @@ -27,7 +27,7 @@ BinTreeNodeWriter::BinTreeNodeWriter(WAConnection* conn, ISocketConnection* conn  void BinTreeNodeWriter::writeDummyHeader()
  {
  	int num = 3;
 -	this->dataBegin = this->out->getPosition();
 +	this->dataBegin = (int)this->out->getPosition();
  	int num2 = this->dataBegin + num;
  	this->out->setLength(num2);
  	this->out->setPosition(num2);
 @@ -40,12 +40,12 @@ void BinTreeNodeWriter::processBuffer()  	unsigned int num = 0u;
  	if (flag)
  	{
 -		long num2 = this->out->getLength() + 4L;
 +		long num2 = (long)this->out->getLength() + 4L;
  		this->out->setLength(num2);
  		this->out->setPosition(num2);
  		num |= 1u;
  	}
 -	long num3 = this->out->getLength() - 3L - (long) this->dataBegin;
 +	long num3 = (long)this->out->getLength() - 3L - (long) this->dataBegin;
  	if (num3 >= 1048576L)
  	{
  		throw WAException("Buffer too large: " + num3, WAException::CORRUPT_STREAM_EX, 0);
 @@ -76,7 +76,7 @@ void BinTreeNodeWriter::streamStart(std::string domain, std::string resource) {  		attributes["to"] = domain;
  		attributes["resource"] = resource;
  		this->writeDummyHeader();
 -		this->writeListStart(attributes.size() * 2 + 1);
 +		this->writeListStart((int)attributes.size() * 2 + 1);
  		this->out->write(1);
  		this->writeAttributes(&attributes);
  		this->processBuffer();
 @@ -135,7 +135,7 @@ void BinTreeNodeWriter::writeString(const std::string& tag) {  	else {
  		size_t atIndex = tag.find('@');
  		if (atIndex == 0 || atIndex == string::npos)
 -			writeBytes((unsigned char*) tag.data(), tag.length());
 +			writeBytes((unsigned char*) tag.data(), (int)tag.length());
  		else {
  			std::string server = tag.substr(atIndex + 1);
  			std::string user = tag.substr(0, atIndex);
 @@ -183,16 +183,16 @@ void BinTreeNodeWriter::writeInt24(int v) {  void BinTreeNodeWriter::writeInternal(ProtocolTreeNode* node) {
  	writeListStart(
 -			1 + (node->attributes == NULL ? 0 : node->attributes->size() * 2)
 +			1 + (node->attributes == NULL ? 0 : (int)node->attributes->size() * 2)
  			+ (node->children == NULL ? 0 : 1)
  			+ (node->data == NULL ? 0 : 1));
  	writeString(node->tag);
  	writeAttributes(node->attributes);
  	if (node->data != NULL) {
 -		writeBytes((unsigned char*) node->data->data(), node->data->size());
 +		writeBytes((unsigned char*) node->data->data(), (int)node->data->size());
  	}
  	if (node->children != NULL && !node->children->empty()) {
 -		writeListStart(node->children->size());
 +		writeListStart((int)node->children->size());
  		for (size_t a = 0; a < node->children->size(); a++) {
  			writeInternal((*node->children)[a]);
  		}
  | 
