From 538efed5fd8d5b775ad0000ae6e9bc14b2d4b060 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=8B=D1=87=D0=BA=D0=BE=D0=B2=20=D0=90=D0=BD=D0=B4?= =?UTF-8?q?=D1=80=D0=B5=D0=B9?= Date: Wed, 12 Dec 2018 10:47:36 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@671 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- src_main/core/pibytearray.h | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src_main/core/pibytearray.h b/src_main/core/pibytearray.h index f706b4ec..6851cfa1 100755 --- a/src_main/core/pibytearray.h +++ b/src_main/core/pibytearray.h @@ -109,13 +109,9 @@ public: //! Add to the end byte array "data" PIByteArray & append(const PIByteArray & data_) {uint ps = size(); enlarge(data_.size_s()); memcpy(data(ps), data_.data(), data_.size()); return *this;} - /*PIByteArray & operator <<(short v) {for (uint i = 0; i < sizeof(v); ++i) push_back(((uchar*)(&v))[i]); return *this;} - PIByteArray & operator <<(ushort v) {for (uint i = 0; i < sizeof(v); ++i) push_back(((uchar*)(&v))[i]); return *this;} - PIByteArray & operator <<(int v) {for (uint i = 0; i < sizeof(v); ++i) push_back(((uchar*)(&v))[i]); return *this;} - PIByteArray & operator <<(uint v) {for (uint i = 0; i < sizeof(v); ++i) push_back(((uchar*)(&v))[i]); return *this;} - PIByteArray & operator <<(llong v) {for (uint i = 0; i < sizeof(v); ++i) push_back(((uchar*)(&v))[i]); return *this;} - PIByteArray & operator <<(ullong v) {for (uint i = 0; i < sizeof(v); ++i) push_back(((uchar*)(&v))[i]); return *this;}*/ - //PIByteArray & operator <<(const PIByteArray & v) {for (uint i = 0; i < v.size(); ++i) push_back(v[i]); return *this;} + + //! Add to the end "t" + PIByteArray & append(uchar t) {push_back(t); return *this;} //! Returns plain 8-bit checksum uchar checksumPlain8() const;