Commit b323dbcf authored by Tomáš Jakubec's avatar Tomáš Jakubec
Browse files

SubelementContainer<0> specialization for unknown number of subelements

fix
parent ee427a0d
Loading
Loading
Loading
Loading
+7 −2
Original line number Diff line number Diff line
@@ -118,9 +118,14 @@ public:


template<typename IndexType>
class SubelementContainer<IndexType, 0> : public std::vector<IndexType> {
class SubelementContainer<IndexType, 0> : public std::vector<Subelement<IndexType>> {
public:
    IndexType getNumberOfSubelements() {
        return this->size();
    }

    void addSubelement(IndexType index) {
        this->push_back(index);
        this->push_back(Subelement<IndexType>{index});
    }

    void removeSubelement(unsigned char atIndex){