diff --git a/Streams and STL/Streams and STL/SportsComplex.h b/Streams and STL/Streams and STL/SportsComplex.h index 4229865d86bee748023b5b77c89b77558067e9ad..d6b8a31ea86ef7287c84f18ccf36e07f06c8dd31 100644 --- a/Streams and STL/Streams and STL/SportsComplex.h +++ b/Streams and STL/Streams and STL/SportsComplex.h @@ -140,6 +140,9 @@ private: Info& operator = (const Info& other_info) { + //!!! Проверка на самоприсваивание + //!!! Для работы со строками есть готовые функции. + for (int i = 0; i < 64; ++i) { if (i < strlen(other_info.client_surname)) @@ -229,7 +232,7 @@ private: return info.minutes < other_info.minutes; } - bool is_inside(const std::multiset container) + bool is_inside(const std::multiset container) //!!! Передача по значению { for (auto i = container.begin(); i != container.end(); ++i) { @@ -245,6 +248,8 @@ private: std::multiset container; public: SportsComplex(): container(std::multiset()) {} + + //!!! Передача по значению SportsComplex(std::multiset container_) : container(container_) {} bool operator == (const SportsComplex&);