Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Generic
diff options
context:
space:
mode:
Commit50c5fe08988d14e3681e6236a2c5f28c89e5edbc (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 11:32:49 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 11:32:49 +0300
Files6a9eb226313104b73e3d23a75a284b27b13affe5 /src/Generic
FMI-OOP-P1_TicketSystem-50c5fe08988d14e3681e6236a2c5f28c89e5edbc.tar
FMI-OOP-P1_TicketSystem-50c5fe08988d14e3681e6236a2c5f28c89e5edbc.tar.gz
FMI-OOP-P1_TicketSystem-50c5fe08988d14e3681e6236a2c5f28c89e5edbc.zip
Parente88802edec407250e5752f1907a5790837f73d55 (diff)
Autocommit at 07.05.2022 @ 11:32
1 files changed, 1 insertions, 1 deletions
-rw-r--r--src/Generic/List/OrderedList.hpp2
diff --git a/src/Generic/List/OrderedList.hpp b/src/Generic/List/OrderedList.hpp
index 83fb68a..069bd4a 100644
--- a/src/Generic/List/OrderedList.hpp
+++ b/src/Generic/List/OrderedList.hpp
@@ -27,7 +27,7 @@ void OrderedList<T>::insert(T element) {
if (List<T>::length == List<T>::count) List<T>::resize();
unsigned insertionInd = 0;
- while (List<T>::elements[insertionInd].compare(element) < 0 && insertionInd < List<T>::count)
+ while (insertionInd < List<T>::count && List<T>::elements[insertionInd].compare(element) < 0)
insertionInd++;
List<T>::insertAt(element, insertionInd);