-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Горшков Николай КМБО-04-21 очищенный Pull requests #38
base: master
Are you sure you want to change the base?
Conversation
float get_the_average_value_of_the_duration_of_life() const { return the_average_value_of_the_duration_of_life; } | ||
|
||
bool Gender; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не выполнен пункт с protected
.
return ss.str(); | ||
}; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Отсутствует перегрузка операции вывода в поток для Animal
.
electricity/electricity.cpp
Outdated
|
||
for (size_t idx_2 = 0; idx_2 < other.getPoleCount(); idx_2++) { | ||
|
||
if (this->getPole(idx_1)->connectedObjectPole == other.getPole(idx_2)->name) return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ошибка: не проверяете, что ваш полюс подключен именно к указанному объекту.
|
||
getPole(poleName)->connectedObjectPole = ""; | ||
this->getPole(poleName)->connectedObject = nullptr; | ||
return true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Не отключаете полюс другого объекта.
|
||
|
||
|
||
float getdataFloat(size_t i) { return ((float*)(this + 2) - 4)[i]; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Почему (this + 2)
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Прибавляем такое количество байт, чтобы обратиться к нужной ячейке памяти
@@ -1,7 +1,31 @@ | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Вы закоммиттили файл с конфликтами.
@@ -1,4 +1,5 @@ | |||
#pragma once | |||
<<<<<<< HEAD |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Аналогично, уберите конфликты.
vectors/vector.cpp
Outdated
vector3d operator - (const vector3d& v1, const vector3d& v2) { return vector3d(v1[0] - v2[0], v1[1] - v2[1], v1[2] - v2[2]); } | ||
vector3d operator * (const vector3d& v1, const float x) { return vector3d(v1[0] * x, v1[1] * x, v1[2] * x); } | ||
vector3d operator / (const vector3d& v1, const float x) { return vector3d(v1[0] / x, v1[1] / x, v1[2] / x); } | ||
const vector3d operator -(const vector3d& v1) { return vector3d(-v1[0], -v1[1], -v1[2]); } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const
в возвращаемом типе, при возврате по значению, не имеет смысла.
No description provided.