From 07130b24c5c9cd417563417252a963e6068eed34 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:21:29 +0000 Subject: [PATCH] git-svn-id: svn://db.shs.com.ru/pip@670 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5 --- FindPIP.cmake | 2 +- src_main/core/pibytearray.h | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/FindPIP.cmake b/FindPIP.cmake index e6d835ac..2d1435b1 100644 --- a/FindPIP.cmake +++ b/FindPIP.cmake @@ -30,7 +30,7 @@ if(NOT PIP_VERSION) file(STRINGS "${PIP_INCLUDES}/pip_version_str.h" _VERSION REGEX "\".*\"") string(REGEX MATCH "\".*\"" _VERSION ${_VERSION}) string(LENGTH ${_VERSION} SL) - math(EXPR SL '${SL}-2') + math(EXPR SL ${SL}-2) string(SUBSTRING ${_VERSION} 1 ${SL} _VERSION) set(PIP_VERSION ${_VERSION} CACHE STRING "VERSION") if (NOT _PIP_MSG) diff --git a/src_main/core/pibytearray.h b/src_main/core/pibytearray.h index 41f18b13..f706b4ec 100755 --- a/src_main/core/pibytearray.h +++ b/src_main/core/pibytearray.h @@ -60,7 +60,10 @@ public: PIByteArray(const uint size) {resize(size);} //! Constructs byte array from data "data" and size "size" - PIByteArray(const void * data, const uint size): PIDeque((const uchar*)data, size_t(size)) {/*for (uint i = 0; i < size; ++i) push_back(((uchar * )data)[i]);*/} + PIByteArray(const void * data, const uint size): PIDeque((const uchar*)data, size_t(size)) {} + + //! Constructs byte array with size "size" filled by "t" + PIByteArray(const uint size, uchar t): PIDeque(size, t) {} //! Help struct to store/restore custom blocks of data to/from PIByteArray