new initializer list ctor #72
No reviewers
Labels
No Label
API Change
Breaking API Change
bug
build
cosmetics
Documentation
duplicate
feature
help wanted
hotfix
invalid
question
Refactor
Tests
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: fsfw/fsfw#72
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "KSat/fsfw:mueller_initializer_list"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
fixes #71
@ -23,3 +28,4 @@
template <typename T>
class PoolEntry : public PoolEntryIF {
public:
static_assert(not std::is_same<T, bool>::value,
Is this compiler warning okay?
@ -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);
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.
@ -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;
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.