Website Summary Files Commits Branches @commit @diff @stats
path: root / src / Services / EventService.cpp
diff options
context:
space:
mode:
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++) {