Website Summary Files Commits Branches @commit @diff @stats
path: root / src
diff options
context:
space:
mode:
2 files changed, 4 insertions, 1 deletions
-rw-r--r--src/.!lazygit.swobin24576 -> 24576 bytes
-rw-r--r--src/List/List.cpp5
diff --git a/src/.!lazygit.swo b/src/.!lazygit.swo
index 7fb9838..510dcb8 100644
--- a/src/.!lazygit.swo
+++ b/src/.!lazygit.swo
Binary files differ
diff --git a/src/List/List.cpp b/src/List/List.cpp
index f65cbba..617bbcf 100644
--- a/src/List/List.cpp
+++ b/src/List/List.cpp
@@ -42,7 +42,10 @@ void List<T>::add(const T& element) {
}
template <class T>
-bool List<T>::insertAt(const T& element) {
+bool List<T>::insertAt(const T& element, unsigned index) {
+ if (index >= count)
+ return add(element);
+
}