Website Summary Files Commits Branches @commit @diff @stats
path: root / src / UserInterface / VenueConsoleUI.cpp
diff options
context:
space:
mode:
Commit451c2832197964b0d5ba225304e1361440d454af (patch)
Author
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 12:18:03 +0300
Committer
 Syndamia <kamen.d.mladenov@protonmail.com>
2022-05-07 12:18:03 +0300
Files3c811f3eba676d4025fa58b872317465775928b5 /src/UserInterface/VenueConsoleUI.cpp
FMI-OOP-P1_TicketSystem-451c2832197964b0d5ba225304e1361440d454af.tar
FMI-OOP-P1_TicketSystem-451c2832197964b0d5ba225304e1361440d454af.tar.gz
FMI-OOP-P1_TicketSystem-451c2832197964b0d5ba225304e1361440d454af.zip
Parent4da4dc9f7658a25eb90647a49514680976d5c382 (diff)
Autocommit at 07.05.2022 @ 12:18
1 files changed, 3 insertions, 5 deletions
-rw-r--r--src/UserInterface/VenueConsoleUI.cpp8
diff --git a/src/UserInterface/VenueConsoleUI.cpp b/src/UserInterface/VenueConsoleUI.cpp
index b5d74ae..0df654d 100644
--- a/src/UserInterface/VenueConsoleUI.cpp
+++ b/src/UserInterface/VenueConsoleUI.cpp
@@ -46,15 +46,13 @@ void command_freeSeats() {
inputSubBox("Enter event date: ", &date);
unsigned seatsPerRow = 0;
- char* seating = nullptr;
- es->createSeatingString(name, date, &seatsPerRow, &seating);
- if (seating == nullptr) {
+ String seating = es->createSeatingString(name, date, &seatsPerRow);
+ if (seating.get_length() == 0) {
handleStatusCode(E_EventDoesNotExist, ticketManagementMenu);
return;
}
- table(1, seatsPerRow, seating);
- delete[] seating;
+ table(1, seatsPerRow, seating.get_cstr());
char tmp;
inputLineBox("[Press enter to continue]", &tmp, 1);