1
0
forked from fsfw/fsfw
This commit is contained in:
2020-07-28 13:13:40 +02:00
parent 35fe41361b
commit 0449c63225
4 changed files with 41 additions and 8 deletions

View File

@ -17,10 +17,18 @@
template<typename T, size_t capacity>
class FIFO: public FIFOBase<T> {
public:
FIFO(): FIFOBase<T>(values.data(), capacity) {};
FIFO(): FIFOBase<T>(fifoArray.data(), capacity) {};
/**
* @brief Custom copy constructor to set pointer correctly.
* @param other
*/
FIFO(const FIFO& other): FIFOBase<T>(other) {
this->setData(fifoArray.data());
}
private:
std::array<T, capacity> values;
std::array<T, capacity> fifoArray;
};
#endif /* FRAMEWORK_CONTAINERS_STATICFIFO_H_ */