Skip to content

Worker#21

Open
S4ll7 wants to merge 25 commits intork4from
Worker
Open

Worker#21
S4ll7 wants to merge 25 commits intork4from
Worker

Conversation

@S4ll7
Copy link
Copy Markdown
Collaborator

@S4ll7 S4ll7 commented Dec 21, 2019

No description provided.

@S4ll7 S4ll7 requested a review from Vinograduss December 21, 2019 17:14
Point EndPoint;
int UserID;
DataIn() {}
DataIn(::Filters _f, unsigned _t, unsigned _md, Point _sp, Point _ep,
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

значения должны передаваться в функцию по значению
именовать переменный через нижнее подчеркивание - плохой стиль. Такое именование используется в системных библиотеках для приватных членов

assert(edges.size() == weights.size());

edgeSize = edges.size();
edgeArr = new edge[edgeSize];
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

вместо сырых указателей в классе стоит использовать умные указатели

weightArr = new weight[edgeSize];
for (size_t i = 0; i < edgeSize; i++) {
*(edgeArr+i) = edges.at(i);
*(weightArr+i)= weights.at(i);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

для преобразования вектора в сырой указатель стоит использовать метод .data() у вектора

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.

4 participants