Commit 25af0e29 authored by Илья Богданов's avatar Илья Богданов
Browse files

Замечания по Storage.h

parent 4b864673
No related merge requests found
Showing with 8 additions and 0 deletions
+8 -0
......@@ -33,6 +33,9 @@ struct Date {
}
Date operator +(const Date& to_summ) {
//!!! Неверная перегрузка: почему изменяется первый операнд? Для этого есть +=
day += to_summ.day;
while (day >= 30) {
day = day - 30;
......@@ -48,6 +51,9 @@ struct Date {
}
Date operator +(const int& to_summ) {
//!!! Неверная перегрузка: почему изменяется первый операнд? Для этого есть +=
day += to_summ;
while (day >= 30) {
day = day - 30;
......@@ -81,6 +87,8 @@ struct Production {
int amount_of_products;
double unit_price;
//!!! Среди полей есть массив. Где конструктор копирования и оператор присваивания?
bool operator ==(const Production& prod_to_comp) {
return storage_id == prod_to_comp.storage_id &&
product_code == prod_to_comp.product_code &&
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment