Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Services / EventService.cpp
diff options
context:
space:
mode:
Commite79951e129ae4f0f6f51496c247edabce0c1d0c5 (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 10:57:41 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 10:57:41 +0300
Filese37d73e4a05c5e2d403c0bc39de2e2057a129973 /src/Services/EventService.cpp
FMI-OOP-P1_TicketSystem-e79951e129ae4f0f6f51496c247edabce0c1d0c5.tar
FMI-OOP-P1_TicketSystem-e79951e129ae4f0f6f51496c247edabce0c1d0c5.tar.gz
FMI-OOP-P1_TicketSystem-e79951e129ae4f0f6f51496c247edabce0c1d0c5.zip
Parent58a0aded601479d7d1ba8a256e500e95f2bcb5bc (diff)
Autocommit at 07.05.2022 @ 10:57
1 files changed, 3 insertions, 1 deletions
-rw-r--r--src/Services/EventService.cpp4
diff --git a/src/Services/EventService.cpp b/src/Services/EventService.cpp
index fc62c64..a1ba34e 100644
--- a/src/Services/EventService.cpp
+++ b/src/Services/EventService.cpp
@@ -135,12 +135,14 @@ StatusCode EventService::buyTicket(const char* name, const Date& date, const Tic
return Success;
}
-String EventService::createSeatingString(const char* name, const Date& date) {
+String EventService::createSeatingString(const char* name, const Date& date, unsigned* seatsPerRow) {
unsigned eInd = indexOfEvent(name, date);
if (eInd == events.get_count())
return "";
unsigned rowCount = events[eInd].get_hall().get_rows(), seatsCount = events[eInd].get_hall().get_seatsPerRow();
+ *seatsPerRow = seatsCount;
+
String out;
for (unsigned row = 1; row <= rowCount; row++) {
for (unsigned seat = 1; seat <= seatsCount; seat++) {