Skip to content

Conversation

Matvey-cmd
Copy link
Contributor

No description provided.

Copy link

clang-tidy review says "All clean, LGTM! 👍"

Copy link

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
Copy link

clang-tidy review says "All clean, LGTM! 👍"

Copy link

clang-tidy review says "All clean, LGTM! 👍"

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

int edge = 3;
vector<vector<int>> edges = {{1, 2, 4}, {2, 3, 5}, {1, 3, 3}};

int result = main_part(vertices, edge, edges);

Choose a reason for hiding this comment

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

warning: variable 'result' of type 'int' can be declared 'const' [misc-const-correctness]

Suggested change
int result = main_part(vertices, edge, edges);
int const result = main_part(vertices, edge, edges);

vector<vector<int>> edges = {{1, 2, 4}, {2, 3, 5}, {1, 3, 3}};

int result = main_part(vertices, edge, edges);
int expected = 7;

Choose a reason for hiding this comment

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

warning: variable 'expected' of type 'int' can be declared 'const' [misc-const-correctness]

Suggested change
int expected = 7;
int const expected = 7;

vector<vector<int>> edges = {
{1, 2, 1}, {2, 3, 1}, {3, 4, 1}, {1, 4, 1}, {2, 4, 1}};

int result = main_part(vertices, edge, edges);

Choose a reason for hiding this comment

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

warning: variable 'result' of type 'int' can be declared 'const' [misc-const-correctness]

Suggested change
int result = main_part(vertices, edge, edges);
int const result = main_part(vertices, edge, edges);

{1, 2, 1}, {2, 3, 1}, {3, 4, 1}, {1, 4, 1}, {2, 4, 1}};

int result = main_part(vertices, edge, edges);
int expected = 3; // MST can include edges with weight 1

Choose a reason for hiding this comment

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

warning: variable 'expected' of type 'int' can be declared 'const' [misc-const-correctness]

Suggested change
int expected = 3; // MST can include edges with weight 1
int const expected = 3; // MST can include edges with weight 1

vector<vector<int>> edges = {{1, 2, 4}, {1, 3, 1}, {2, 3, 2}, {2, 4, 5},
{3, 4, 8}, {4, 5, 3}, {5, 6, 7}, {4, 6, 6}};

int result = main_part(vertices, edge, edges);

Choose a reason for hiding this comment

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

warning: variable 'result' of type 'int' can be declared 'const' [misc-const-correctness]

Suggested change
int result = main_part(vertices, edge, edges);
int const result = main_part(vertices, edge, edges);

{3, 4, 8}, {4, 5, 3}, {5, 6, 7}, {4, 6, 6}};

int result = main_part(vertices, edge, edges);
int expected = 17; // Minimum spanning tree weight

Choose a reason for hiding this comment

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

warning: variable 'expected' of type 'int' can be declared 'const' [misc-const-correctness]

Suggested change
int expected = 17; // Minimum spanning tree weight
int const expected = 17; // Minimum spanning tree weight

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

clang-tidy made some suggestions

vector<vector<int>> edges = {{1, 2, 4}, {2, 3, 5}, {1, 3, 3}};

int const result = main_part(vertices, edge, edges);
int expected = 7;

Choose a reason for hiding this comment

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

warning: variable 'expected' of type 'int' can be declared 'const' [misc-const-correctness]

Suggested change
int expected = 7;
int const expected = 7;

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.

1 participant