From 02b8cb0260c4aeca78ab3ede5482e99d7fc61f96 Mon Sep 17 00:00:00 2001 From: Isaikin Roman Date: Sat, 12 Sep 2015 16:59:01 +0300 Subject: [PATCH] Qt4 build fix. --- doc/custom.rst | 2 +- src/msgpackcommon.h | 4 ++-- src/msgpackcommon.h.in | 4 ++-- src/msgpackstream.cpp | 8 ++++---- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/custom.rst b/doc/custom.rst index a870643..08b5192 100644 --- a/doc/custom.rst +++ b/doc/custom.rst @@ -138,4 +138,4 @@ In this case size of data is known id advance, if this is not the case, then you .. 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. \ No newline at end of file + 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. \ No newline at end of file diff --git a/src/msgpackcommon.h b/src/msgpackcommon.h index 9f399b2..68a6479 100644 --- a/src/msgpackcommon.h +++ b/src/msgpackcommon.h @@ -36,8 +36,8 @@ const quint8 FIXARRAY = 0x90; const quint8 FIXSTR = 0xa0; const quint8 NIL = 0xc0; const quint8 NEVER_USED = 0xc1; -const quint8 FALSE = 0xc2; -const quint8 TRUE = 0xc3; +const quint8 MFALSE = 0xc2; +const quint8 MTRUE = 0xc3; const quint8 BIN8 = 0xc4; const quint8 BIN16 = 0xc5; const quint8 BIN32 = 0xc6; diff --git a/src/msgpackcommon.h.in b/src/msgpackcommon.h.in index d39965a..aaf6d82 100644 --- a/src/msgpackcommon.h.in +++ b/src/msgpackcommon.h.in @@ -36,8 +36,8 @@ const quint8 FIXARRAY = 0x90; const quint8 FIXSTR = 0xa0; const quint8 NIL = 0xc0; const quint8 NEVER_USED = 0xc1; -const quint8 FALSE = 0xc2; -const quint8 TRUE = 0xc3; +const quint8 MFALSE = 0xc2; +const quint8 MTRUE = 0xc3; const quint8 BIN8 = 0xc4; const quint8 BIN16 = 0xc5; const quint8 BIN32 = 0xc6; diff --git a/src/msgpackstream.cpp b/src/msgpackstream.cpp index 872d243..4dbe903 100644 --- a/src/msgpackstream.cpp +++ b/src/msgpackstream.cpp @@ -95,10 +95,10 @@ MsgPackStream &MsgPackStream::operator>>(bool &b) b = false; setStatus(ReadPastEnd); } else { - if (p[0] != MsgPack::FirstByte::TRUE || - p[0] != MsgPack::FirstByte::FALSE) + if (p[0] != MsgPack::FirstByte::MTRUE || + p[0] != MsgPack::FirstByte::MFALSE) setStatus(ReadCorruptData); - b = (p[0] == MsgPack::FirstByte::TRUE); + b = (p[0] == MsgPack::FirstByte::MTRUE); } return *this; } @@ -369,7 +369,7 @@ MsgPackStream &MsgPackStream::operator<<(bool b) { CHECK_STREAM_WRITE_PRECOND(*this); quint8 m = b == true ? - MsgPack::FirstByte::TRUE : MsgPack::FirstByte::FALSE; + MsgPack::FirstByte::MTRUE : MsgPack::FirstByte::MFALSE; if (dev->write((char *)&m, 1) != 1) setStatus(WriteFailed); return *this;