diff options
Autocommit at 07.05.2022 @ 16:53
3 files changed, 3 insertions, 3 deletions
| -rw-r--r-- | src/Models/Event.cpp | 2 | ||||
| -rw-r--r-- | src/Models/Hall.cpp | 2 | ||||
| -rw-r--r-- | src/Models/Hall.h | 2 |
diff --git a/src/Models/Event.cpp b/src/Models/Event.cpp index 71bf63a..18d0f91 100644 --- a/src/Models/Event.cpp +++ b/src/Models/Event.cpp @@ -30,7 +30,7 @@ const Date& Event::get_date() const { } void Event::read(std::istream& istr) { - hall.read(istr); + istr.read(istr.hall, sizeof(hall)); name.read(istr); date.read(istr); tickets.read(istr); diff --git a/src/Models/Hall.cpp b/src/Models/Hall.cpp index b1c7ed3..41644df 100644 --- a/src/Models/Hall.cpp +++ b/src/Models/Hall.cpp @@ -27,7 +27,7 @@ void Hall::read(std::istream& istr) { istr.read((char*)&seatsPerRow, sizeof(seatsPerRow)); } -void Hall::write(std::ostream& ostr) { +void Hall::write(std::ostream& ostr) const { ostr.write((char*)&number, sizeof(number)); ostr.write((char*)&rows, sizeof(rows)); ostr.write((char*)&seatsPerRow, sizeof(seatsPerRow)); diff --git a/src/Models/Hall.h b/src/Models/Hall.h index 3cdcac4..af7acb1 100644 --- a/src/Models/Hall.h +++ b/src/Models/Hall.h @@ -19,7 +19,7 @@ public: unsigned get_seatsPerRow() const; void read(std::istream& istr); - void write(std::ostream& ostr); + void write(std::ostream& ostr) const; int compare(const Hall& other) const; friend std::istream& operator>>(std::istream& istr, Hall& hall); |
