Skip to content

Main #34

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

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Conversation

Salnikova-Lida
Copy link

tasks 1, 2, 4

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

There were too many comments to post at once. Showing the first 15 out of 28. Check the log or trigger a new build to see more.

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

There were too many comments to post at once. Showing the first 15 out of 43. Check the log or trigger a new build to see more.

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

There were too many comments to post at once. Showing the first 15 out of 43. Check the log or trigger a new build to see more.

@Salnikova-Lida
Copy link
Author

I've done tasks 1, 2, 4 and 5 in this pull request

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

There were too many comments to post at once. Showing the first 15 out of 43. Check the log or trigger a new build to see more.

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

There were too many comments to post at once. Showing the first 15 out of 43. Check the log or trigger a new build to see more.

std::vector<int> weak_vertexes = CuttingVertex(data);
std::vector<std::pair<int, int>> ans_edge = {{2, 1}, {2, 3}, {3, 4}, {4, 5},
{5, 6}, {6, 7}, {7, 8}};
std::vector<int> ans_vert = {1, 2, 3, 4, 5, 6, 7};

Choose a reason for hiding this comment

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

warning: variable 'ans_vert' of type 'std::vector' can be declared 'const' [misc-const-correctness]

Suggested change
std::vector<int> ans_vert = {1, 2, 3, 4, 5, 6, 7};
std::vector<int> const ans_vert = {1, 2, 3, 4, 5, 6, 7};

Copy link
Contributor

@LostPointer LostPointer left a comment

Choose a reason for hiding this comment

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

не все задания и в первом тестов не хватает(

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

There were too many comments to post at once. Showing the first 15 out of 52. Check the log or trigger a new build to see more.

std::vector<int> TopologicalSort(std::vector<std::vector<int>> &data) {
int lenth = data.size();
std::vector<int> status(lenth, 0);
std::vector<int> top_order;

Choose a reason for hiding this comment

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

warning: narrowing conversion from 'size_type' (aka 'unsigned long') to signed type 'int' is implementation-defined [cppcoreguidelines-narrowing-conversions]

 {
                 ^

std::vector<int> TopologicalSort(std::vector<std::vector<int>> &data) {
int lenth = data.size();
std::vector<int> status(lenth, 0);
std::vector<int> top_order;

Choose a reason for hiding this comment

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

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

Suggested change
std::vector<int> top_order;
{const

std::vector<std::vector<int>> data({{1}, {2, 3}, {3, 0}, {}});
try {
std::vector<int> top_order = TopologicalSort(data);
} catch (std::runtime_error) {

Choose a reason for hiding this comment

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

warning: variable 'top_order' of type 'std::vector' can be declared 'const' [misc-const-correctness]

Suggested change
} catch (std::runtime_error) {
);const

} catch (std::runtime_error) {
error = true;
}
ASSERT_EQ(error, true); // Stack []

Choose a reason for hiding this comment

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

warning: catch handler catches by value; should catch by reference instead [misc-throw-by-value-catch-by-reference]

Sort(data);
                       ^

{{}, {4, 6}, {7}, {7, 4}, {5}, {}, {2}, {0, 6, 5}});
try {
std::vector<int> top_order = TopologicalSort(data);
} catch (std::runtime_error) {

Choose a reason for hiding this comment

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

warning: variable 'top_order' of type 'std::vector' can be declared 'const' [misc-const-correctness]

Suggested change
} catch (std::runtime_error) {
);const

std::vector<int> weak_vertexes = CuttingVertex(data);
std::vector<std::pair<int, int>> ans_edge = {{2, 1}, {2, 3}, {3, 4}, {4, 5},
{5, 6}, {6, 7}, {7, 8}};
std::vector<int> ans_vert = {1, 2, 3, 4, 5, 6, 7};

Choose a reason for hiding this comment

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

warning: variable 'ans_vert' of type 'std::vector' can be declared 'const' [misc-const-correctness]

Suggested change
std::vector<int> ans_vert = {1, 2, 3, 4, 5, 6, 7};
std::vector<int> const ans_vert = {1, 2, 3, 4, 5, 6, 7};

{6, 4},
{4}});
std::vector<std::pair<int, int>> weak_edges = CuttingEdge(data);
std::vector<int> weak_vertexes = CuttingVertex(data);

Choose a reason for hiding this comment

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

warning: variable 'weak_vertexes' of type 'std::vector' can be declared 'const' [misc-const-correctness]

Suggested change
std::vector<int> weak_vertexes = CuttingVertex(data);
std::vector<int> const weak_vertexes = CuttingVertex(data);

std::vector<int> weak_vertexes = CuttingVertex(data);
std::vector<std::pair<int, int>> ans_edge = {
{2, 1}, {4, 9}, {3, 5}, {3, 7}, {4, 3}, {8, 6}, {4, 8}, {2, 4}, {0, 2}};
std::vector<int> ans_vert = {2, 3, 4, 8};

Choose a reason for hiding this comment

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

warning: variable 'ans_vert' of type 'std::vector' can be declared 'const' [misc-const-correctness]

Suggested change
std::vector<int> ans_vert = {2, 3, 4, 8};
std::vector<int> const ans_vert = {2, 3, 4, 8};

std::vector<std::vector<int>> data(
{{1, 8}, {0, 2}, {1, 3}, {2, 4}, {3, 5}, {4, 6}, {5, 7}, {6, 8}, {7, 0}});
std::vector<std::pair<int, int>> weak_edges = CuttingEdge(data);
std::vector<int> weak_vertexes = CuttingVertex(data);

Choose a reason for hiding this comment

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

warning: variable 'weak_vertexes' of type 'std::vector' can be declared 'const' [misc-const-correctness]

Suggested change
std::vector<int> weak_vertexes = CuttingVertex(data);
std::vector<int> const weak_vertexes = CuttingVertex(data);

std::vector<std::pair<int, int>> weak_edges = CuttingEdge(data);
std::vector<int> weak_vertexes = CuttingVertex(data);
std::vector<std::pair<int, int>> ans_edge = {};
std::vector<int> ans_vert = {};

Choose a reason for hiding this comment

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

warning: variable 'ans_vert' of type 'std::vector' can be declared 'const' [misc-const-correctness]

Suggested change
std::vector<int> ans_vert = {};
std::vector<int> const ans_vert = {};

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