From b86e5664c470bf1b1c9615abb8557d51d3f86eb8 Mon Sep 17 00:00:00 2001 From: "Robin.Mueller" Date: Sun, 5 Jul 2020 00:33:03 +0200 Subject: [PATCH] include which was missing, pool raw access size_t replacements --- datapoolglob/PoolRawAccess.cpp | 5 ++++- datapoolglob/PoolRawAccess.h | 8 ++++---- serialize/SerializeAdapter.h | 1 + 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/datapoolglob/PoolRawAccess.cpp b/datapoolglob/PoolRawAccess.cpp index cd4138d3..4355cd0f 100644 --- a/datapoolglob/PoolRawAccess.cpp +++ b/datapoolglob/PoolRawAccess.cpp @@ -204,7 +204,7 @@ void PoolRawAccess::setValid(bool valid) { this->valid = valid; } -uint16_t PoolRawAccess::getSizeTillEnd() const { +size_t PoolRawAccess::getSizeTillEnd() const { return sizeTillEnd; } @@ -233,4 +233,7 @@ ReturnValue_t PoolRawAccess::deSerialize(const uint8_t **buffer, size_t *size, *buffer += typeSize; return HasReturnvaluesIF::RETURN_OK; } + else { + return SerializeIF::STREAM_TOO_SHORT; + } } diff --git a/datapoolglob/PoolRawAccess.h b/datapoolglob/PoolRawAccess.h index 2ef1d653..f58efdd0 100644 --- a/datapoolglob/PoolRawAccess.h +++ b/datapoolglob/PoolRawAccess.h @@ -133,7 +133,7 @@ public: /** * Getter for the remaining size. */ - uint16_t getSizeTillEnd() const; + size_t getSizeTillEnd() const; /** * @brief This is a call to read the value from the global data pool. @@ -202,15 +202,15 @@ private: /** * @brief This value contains the size of the data pool entry type in bytes. */ - uint8_t typeSize; + size_t typeSize; /** * The size of the DP array (single values return 1) */ - uint8_t arraySize; + size_t arraySize; /** * The size (in bytes) from the selected entry till the end of this DataPool variable. */ - uint16_t sizeTillEnd; + size_t sizeTillEnd; /** * @brief The information whether the class is read-write or read-only is stored here. */ diff --git a/serialize/SerializeAdapter.h b/serialize/SerializeAdapter.h index bb364eae..4534ffb8 100644 --- a/serialize/SerializeAdapter.h +++ b/serialize/SerializeAdapter.h @@ -1,6 +1,7 @@ #ifndef SERIALIZEADAPTER_H_ #define SERIALIZEADAPTER_H_ +#include #include #include #include