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