Qt4 build fix.

This commit is contained in:
Isaikin Roman
2015-09-12 16:59:01 +03:00
parent 5761f66683
commit 02b8cb0260
4 changed files with 9 additions and 9 deletions

View File

@ -138,4 +138,4 @@ In this case size of data is known id advance, if this is not the case, then you
.. tip:: .. tip::
Of course you can just stream out everything without any ext header and user type id's, like this: ``s << point.x() << point.y();`` but in that case you will not be able to unpack anything useful with MsgPack::unpack() or in other MsgPack implementations. Of course you can just stream out everything without any ext header and user type id's, like this: ``s << point.x() << point.y(); return s;`` but in that case you will not be able to unpack anything useful with MsgPack::unpack() or in other MsgPack implementations.

View File

@ -36,8 +36,8 @@ const quint8 FIXARRAY = 0x90;
const quint8 FIXSTR = 0xa0; const quint8 FIXSTR = 0xa0;
const quint8 NIL = 0xc0; const quint8 NIL = 0xc0;
const quint8 NEVER_USED = 0xc1; const quint8 NEVER_USED = 0xc1;
const quint8 FALSE = 0xc2; const quint8 MFALSE = 0xc2;
const quint8 TRUE = 0xc3; const quint8 MTRUE = 0xc3;
const quint8 BIN8 = 0xc4; const quint8 BIN8 = 0xc4;
const quint8 BIN16 = 0xc5; const quint8 BIN16 = 0xc5;
const quint8 BIN32 = 0xc6; const quint8 BIN32 = 0xc6;

View File

@ -36,8 +36,8 @@ const quint8 FIXARRAY = 0x90;
const quint8 FIXSTR = 0xa0; const quint8 FIXSTR = 0xa0;
const quint8 NIL = 0xc0; const quint8 NIL = 0xc0;
const quint8 NEVER_USED = 0xc1; const quint8 NEVER_USED = 0xc1;
const quint8 FALSE = 0xc2; const quint8 MFALSE = 0xc2;
const quint8 TRUE = 0xc3; const quint8 MTRUE = 0xc3;
const quint8 BIN8 = 0xc4; const quint8 BIN8 = 0xc4;
const quint8 BIN16 = 0xc5; const quint8 BIN16 = 0xc5;
const quint8 BIN32 = 0xc6; const quint8 BIN32 = 0xc6;

View File

@ -95,10 +95,10 @@ MsgPackStream &MsgPackStream::operator>>(bool &b)
b = false; b = false;
setStatus(ReadPastEnd); setStatus(ReadPastEnd);
} else { } else {
if (p[0] != MsgPack::FirstByte::TRUE || if (p[0] != MsgPack::FirstByte::MTRUE ||
p[0] != MsgPack::FirstByte::FALSE) p[0] != MsgPack::FirstByte::MFALSE)
setStatus(ReadCorruptData); setStatus(ReadCorruptData);
b = (p[0] == MsgPack::FirstByte::TRUE); b = (p[0] == MsgPack::FirstByte::MTRUE);
} }
return *this; return *this;
} }
@ -369,7 +369,7 @@ MsgPackStream &MsgPackStream::operator<<(bool b)
{ {
CHECK_STREAM_WRITE_PRECOND(*this); CHECK_STREAM_WRITE_PRECOND(*this);
quint8 m = b == true ? quint8 m = b == true ?
MsgPack::FirstByte::TRUE : MsgPack::FirstByte::FALSE; MsgPack::FirstByte::MTRUE : MsgPack::FirstByte::MFALSE;
if (dev->write((char *)&m, 1) != 1) if (dev->write((char *)&m, 1) != 1)
setStatus(WriteFailed); setStatus(WriteFailed);
return *this; return *this;