binarytree: type fix

This commit is contained in:
otfallen 2012-09-28 07:24:49 +00:00
parent 655b5a8ce4
commit e1900bdf9a
2 changed files with 4 additions and 3 deletions

View File

@ -240,11 +240,12 @@ void OutputBinaryTree::endNode()
m_fin->addU8(BINARYTREE_NODE_END);
}
void OutputBinaryTree::write(const uint8 *data, int size)
void OutputBinaryTree::write(const uint8 *data, size_t size)
{
for(int i=0;i<size;++i) {
for(size_t i=0;i<size;++i) {
if(data[i]==BINARYTREE_NODE_START || data[i]==BINARYTREE_NODE_END||data[i]==BINARYTREE_ESCAPE_CHAR)
m_fin->addU8(BINARYTREE_ESCAPE_CHAR);
m_fin->addU8(data[i]);
}
}

View File

@ -85,7 +85,7 @@ private:
FileStreamPtr m_fin;
protected:
void write(const uint8* data, int size);
void write(const uint8* data, size_t size);
};
#endif