Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Services / EventService.cpp
diff options
context:
space:
mode:
1 files changed, 2 insertions, 2 deletions
-rw-r--r--src/Services/EventService.cpp4
diff --git a/src/Services/EventService.cpp b/src/Services/EventService.cpp
index fa50d0b..6eb9f8a 100644
--- a/src/Services/EventService.cpp
+++ b/src/Services/EventService.cpp
@@ -43,8 +43,8 @@ StatusCode EventService::createEvent(int hallNumber, const String& name, const D
if (hInd == hs->get_halls().get_count())
return E_HallDoesntExist;
- unsigned eInd = indexOfEvent(date)
- if (true)
+ unsigned eInd = events.findIndex(Event(hallNumber, "", date));
+ if (eInd < events.get_count())
return E_EventWillOverlap;
events.insert(Event(*hall, name, date));