From 2acfaf4cc546f1b7b0cd28560c266d8a0b8e8bdc Mon Sep 17 00:00:00 2001 From: Roman Date: Tue, 19 May 2015 23:02:13 +0300 Subject: [PATCH] Typo --- src/msgpack_common.h | 10 +++++----- src/stream.cpp | 15 ++++++++------- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/src/msgpack_common.h b/src/msgpack_common.h index 17f713b..e8cf602 100644 --- a/src/msgpack_common.h +++ b/src/msgpack_common.h @@ -10,14 +10,14 @@ namespace MsgPack { /** - * pack some variant to byte array data - * when write == false only calculates and returns size - * when write == true writes bytes to data, and returns the same size - * return type size + * @brief pack user type to byte array data + * @arg variant user type, must be registered first + * @return array with user data only, all other fields will be added automatically */ typedef QByteArray (*pack_user_f)(const QVariant &variant); /** - * unpack user type to QVariant + * @brief unpack user type to QVariant + * @arg data only user data, without size and messagepack type */ typedef QVariant (*unpack_user_f)(const QByteArray &data); /** diff --git a/src/stream.cpp b/src/stream.cpp index 3c59216..468d226 100644 --- a/src/stream.cpp +++ b/src/stream.cpp @@ -121,7 +121,7 @@ MsgPackStream &MsgPackStream::operator>>(quint16 &u16) setStatus(ReadPastEnd); return *this; } - if (!unpack_upto_quint16(u16, &p { + if (!unpack_upto_quint16(u16, &p)) setStatus(ReadCorruptData); return *this; } @@ -134,7 +134,7 @@ MsgPackStream &MsgPackStream::operator>>(quint32 &u32) setStatus(ReadPastEnd); return *this; } - if (!unpack_upto_quint32(u32, &p { + if (!unpack_upto_quint32(u32, &p)) setStatus(ReadCorruptData); return *this; } @@ -147,7 +147,7 @@ MsgPackStream &MsgPackStream::operator>>(quint64 &u64) setStatus(ReadPastEnd); return *this; } - if (!unpack_upto_quint64(u64, &p { + if (!unpack_upto_quint64(u64, &p)) setStatus(ReadCorruptData); return *this; } @@ -160,7 +160,8 @@ MsgPackStream &MsgPackStream::operator>>(qint8 &i8) setStatus(ReadPastEnd); return *this; } - if (!unpack_upto_qint8(i8, &p)) setStatus(ReadCorruptData); + if (!unpack_upto_qint8(i8, &p)) + setStatus(ReadCorruptData); return *this; } @@ -172,7 +173,7 @@ MsgPackStream &MsgPackStream::operator>>(qint16 &i16) setStatus(ReadPastEnd); return *this; } - if (!unpack_upto_qint16(i16, &p){ + if (!unpack_upto_qint16(i16, &p)) setStatus(ReadCorruptData); return *this; } @@ -185,7 +186,7 @@ MsgPackStream &MsgPackStream::operator>>(qint32 &i32) setStatus(ReadPastEnd); return *this; } - if (!unpack_upto_qint32(i32, &p){ + if (!unpack_upto_qint32(i32, &p)) setStatus(ReadCorruptData); return *this; } @@ -198,7 +199,7 @@ MsgPackStream &MsgPackStream::operator>>(qint64 &i64) setStatus(ReadPastEnd); return *this; } - if (!unpack_upto_qint64(i64, &p){ + if (!unpack_upto_qint64(i64, &p)) setStatus(ReadCorruptData); return *this; }