pool entry takes const T* now

This commit is contained in:
Robin Müller 2022-04-07 19:47:37 +02:00
parent 51e7f1c2f2
commit 47ced1efac
No known key found for this signature in database
GPG Key ID: 71B58F8A3CDFA9AC
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ PoolEntry<T>::PoolEntry(std::initializer_list<T> initValues, bool setValid)
} }
template <typename T> template <typename T>
PoolEntry<T>::PoolEntry(T* initValue, uint8_t setLength, bool setValid) PoolEntry<T>::PoolEntry(const T* initValue, uint8_t setLength, bool setValid)
: length(setLength), valid(setValid) { : length(setLength), valid(setValid) {
this->address = new T[this->length](); this->address = new T[this->length]();
if (initValue != nullptr) { if (initValue != nullptr) {

View File

@ -65,7 +65,7 @@ class PoolEntry : public PoolEntryIF {
* @param setValid * @param setValid
* Sets the initialization flag. It is invalid by default. * Sets the initialization flag. It is invalid by default.
*/ */
PoolEntry(T* initValue, uint8_t setLength = 1, bool setValid = false); PoolEntry(const T* initValue, uint8_t setLength = 1, bool setValid = false);
//! Explicitely deleted copy ctor, copying is not allowed. //! Explicitely deleted copy ctor, copying is not allowed.
PoolEntry(const PoolEntry&) = delete; PoolEntry(const PoolEntry&) = delete;