diff options
Autocommit at 05.05.2022 @ 17:23
2 files changed, 6 insertions, 1 deletions
| -rw-r--r-- | src/EventSystem/Event.cpp | 5 | ||||
| -rw-r--r-- | src/EventSystem/EventSystem.cpp | 2 |
diff --git a/src/EventSystem/Event.cpp b/src/EventSystem/Event.cpp index 6940aed..3deb58c 100644 --- a/src/EventSystem/Event.cpp +++ b/src/EventSystem/Event.cpp @@ -58,6 +58,11 @@ StatusCode Event::buyTicketFromReservation(const Reservation& reservation, const return Success; } +bool Event::ticketIsFree(unsigned row, unsigned seat) { + Ticket temp(row, seat); + unsigned ind = tickets.findIndex(temp); +} + int Event::compare(const Event& other) { // TODO: improve return name.compare(other.name); diff --git a/src/EventSystem/EventSystem.cpp b/src/EventSystem/EventSystem.cpp index 260b873..cdfa6c9 100644 --- a/src/EventSystem/EventSystem.cpp +++ b/src/EventSystem/EventSystem.cpp @@ -63,7 +63,7 @@ List<Ticket> EventSystem::queryFreeTickets(const char* name, const Date& dt) { if (ind == events.get_count()) return List<Ticket>(); - List<Ticket> freeTickets = List<Ticket>(); + List<Ticket> freeTickets; unsigned nextIndT = 0, nextIndR = 0; for (unsigned r = 1; r <= events[ind].get_hall().get_rowCount(); r++) { |
