Skip to content

Conversation

@Nikgor2002
Copy link

No description provided.

@Nikgor2002 Nikgor2002 changed the title Горшков Николай КМБО-04-21 Горшков Николай КМБО-04-21 очищенный Pull requests May 31, 2022
void set_the_average_value_of_the_duration_of_life(float new_the_average_value_of_the_duration_of_life) { the_average_value_of_the_duration_of_life = new_the_average_value_of_the_duration_of_life; }
float get_the_average_value_of_the_duration_of_life() const { return the_average_value_of_the_duration_of_life; }

bool Gender;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Не выполнен пункт с protected.

ss << "Gender = " << " " << Gender;
return ss.str();
};

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Отсутствует перегрузка операции вывода в поток для Animal.


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;
Copy link
Owner

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;
Copy link
Owner

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]; }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Почему (this + 2)?

Copy link
Author

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
Copy link
Owner

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
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Аналогично, уберите конфликты.

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]); }
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

const в возвращаемом типе, при возврате по значению, не имеет смысла.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants