Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Models / Event.cpp
diff options
context:
space:
mode:
Commit8843a8c5ac6e74b6dd241d345e84afe7078c4ab3 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 09:47:15 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 09:47:15 +0300
Filese9a2326d2467de2557f2541b76c771e9042e2588 /src/Models/Event.cpp
FMI-OOP-P1_TicketSystem-8843a8c5ac6e74b6dd241d345e84afe7078c4ab3.tar
FMI-OOP-P1_TicketSystem-8843a8c5ac6e74b6dd241d345e84afe7078c4ab3.tar.gz
FMI-OOP-P1_TicketSystem-8843a8c5ac6e74b6dd241d345e84afe7078c4ab3.zip
Parentf217867b63fefdbd76ef77ad0957048520822add (diff)
Autocommit at 07.05.2022 @ 09:47
1 files changed, 3 insertions, 1 deletions
-rw-r--r--src/Models/Event.cpp4
diff --git a/src/Models/Event.cpp b/src/Models/Event.cpp
index f570fbf..034e4b3 100644
--- a/src/Models/Event.cpp
+++ b/src/Models/Event.cpp
@@ -30,5 +30,7 @@ const Date& Event::get_date() const {
}
int Event::compare(const Event& other) {
- return name.compare(other.name);
+ if (hall == other.hall)
+ return date.compare(other.date);
+ return hall->compare(*other.hall);
}