Generate sentences from cf grammar. Fix list initialization from copy constructor
This commit is contained in:
parent
d888aeb2b4
commit
6fcfa075f8
4 changed files with 84 additions and 4 deletions
|
|
@ -72,7 +72,7 @@ namespace tp {
|
|||
public:
|
||||
|
||||
List() = default;
|
||||
|
||||
List(const List& in) { this->operator=(in); }
|
||||
List(const InitialierList<Type>& list) { operator=(list); }
|
||||
|
||||
[[nodiscard]] inline Node* first() const { return mFirst; }
|
||||
|
|
@ -146,7 +146,7 @@ namespace tp {
|
|||
}
|
||||
|
||||
[[nodiscard]] Node* findIdx(Index idx) const {
|
||||
DEBUG_ASSERT(!mFirst || idx > mLength - 1)
|
||||
DEBUG_ASSERT(mFirst && idx < mLength && idx >= 0)
|
||||
Node* found = mFirst;
|
||||
for (int i = 0; i != idx; i++) {
|
||||
found = found->next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue