new initializer list ctor #72

Merged
muellerr merged 4 commits from KSat/fsfw:mueller_initializer_list into master 2020-07-07 12:10:54 +02:00
Owner

fixes #71

fixes #71
muellerr added the
feature
label 2020-05-08 14:40:49 +02:00
muellerr reviewed 2020-06-05 13:48:39 +02:00
@ -23,3 +28,4 @@
template <typename T>
class PoolEntry : public PoolEntryIF {
public:
static_assert(not std::is_same<T, bool>::value,
Author
Owner

Is this compiler warning okay?

Is this compiler warning okay?
muellerr reviewed 2020-06-05 13:49:30 +02:00
@ -33,2 +53,3 @@
*/
PoolEntry( T* initValue = NULL, uint8_t set_length = 1, uint8_t set_valid = 0 );
PoolEntry(std::initializer_list<T> initValue = {}, uint8_t setLength = 1,
bool setValid = false);
Author
Owner

I don't see a reason not to use booleans for the interface. Even if the valid flag is stored internally as an uint8_, the passed value will be implictely converted.

I don't see a reason not to use booleans for the interface. Even if the valid flag is stored internally as an uint8_, the passed value will be implictely converted.
muellerr reviewed 2020-06-05 13:50:30 +02:00
@ -51,2 +43,3 @@
* @brief This method allows to set the valid information of the pool entry.
*/
virtual void setValid(uint8_t isValid) = 0;
virtual void setValid(bool isValid) = 0;
Author
Owner

I don't see a reason not to use booleans for the interface. the underlying implementation can still use an uint8_t, ENUM or something else.

I don't see a reason not to use booleans for the interface. the underlying implementation can still use an uint8_t, ENUM or something else.
muellerr closed this pull request 2020-07-07 12:10:54 +02:00
Sign in to join this conversation.
No description provided.