Redo of render paths

This commit is contained in:
Dynamitos
2020-06-02 11:46:18 +02:00
parent bb5b48698a
commit 356e6058fe
121 changed files with 3890 additions and 572 deletions
+5
View File
@@ -385,6 +385,11 @@ public:
assert(index >= 0 && index < N);
return _data[index];
}
const T &operator[](int index) const
{
assert(index >= 0 && index < N);
return _data[index];
}
template <typename X>
class IteratorBase
+18
View File
@@ -132,6 +132,24 @@ public:
size++;
return insertedElement;
}
Iterator add(T&& value)
{
if (root == nullptr)
{
root = new Node();
tail = root;
}
tail->data = std::move(value);
Node *newTail = new Node();
newTail->prev = tail;
newTail->next = nullptr;
tail->next = newTail;
Iterator insertedElement(tail);
tail = newTail;
refreshIterators();
size++;
return insertedElement;
}
Iterator remove(Iterator pos)
{
size--;
+1
View File
@@ -141,6 +141,7 @@ public:
Node *node;
Array<Node *> traversal;
};
V &operator[](const K &key)
{
root = splay(root, key);