-
Notifications
You must be signed in to change notification settings - Fork 22
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
base: main
Are you sure you want to change the base?
Main #34
Conversation
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.
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.
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.
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.
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.
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.
I've done tasks 1, 2, 4 and 5 in this pull request |
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.
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.
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.
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}; |
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.
warning: variable 'ans_vert' of type 'std::vector' can be declared 'const' [misc-const-correctness]
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}; |
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.
не все задания и в первом тестов не хватает(
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.
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; |
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.
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; |
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.
warning: variable 'lenth' of type 'int' can be declared 'const' [misc-const-correctness]
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) { |
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.
warning: variable 'top_order' of type 'std::vector' can be declared 'const' [misc-const-correctness]
} catch (std::runtime_error) { | |
);const |
} catch (std::runtime_error) { | ||
error = true; | ||
} | ||
ASSERT_EQ(error, true); // Stack [] |
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.
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) { |
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.
warning: variable 'top_order' of type 'std::vector' can be declared 'const' [misc-const-correctness]
} 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}; |
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.
warning: variable 'ans_vert' of type 'std::vector' can be declared 'const' [misc-const-correctness]
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); |
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.
warning: variable 'weak_vertexes' of type 'std::vector' can be declared 'const' [misc-const-correctness]
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}; |
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.
warning: variable 'ans_vert' of type 'std::vector' can be declared 'const' [misc-const-correctness]
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); |
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.
warning: variable 'weak_vertexes' of type 'std::vector' can be declared 'const' [misc-const-correctness]
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 = {}; |
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.
warning: variable 'ans_vert' of type 'std::vector' can be declared 'const' [misc-const-correctness]
std::vector<int> ans_vert = {}; | |
std::vector<int> const ans_vert = {}; |
tasks 1, 2, 4