-
Notifications
You must be signed in to change notification settings - Fork 21
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
Pronin Arkadiy's Tasks #29
base: main
Are you sure you want to change the base?
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 16. 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
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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 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
#include <iostream> | ||
#include <stdexcept> | ||
|
||
#define UNREACHABLE (-1) |
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: macro 'UNREACHABLE' defines an integral constant; prefer an enum instead [cppcoreguidelines-macro-to-enum]
#define UNREACHABLE (-1)
^
#include <stdexcept> | ||
|
||
#define UNREACHABLE (-1) | ||
|
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: replace macro with enum [cppcoreguidelines-macro-to-enum]
enum { | |
UNREACHABLE = (-1)}; | |
|
||
void Graph::PrintGraph() const { | ||
if (vertexes_num == 0) { | ||
std::cerr << "Error: Graph is empty." << std::endl; |
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: do not use 'std::endl' with streams; use '\n' instead [performance-avoid-endl]
std::cerr << "Error: Graph is empty." << std::endl; | |
std::cerr << "Error: Graph is empty." << '\n'; |
return dst; | ||
} | ||
|
||
void Dijkstra(int v, int from, vector<int>& vis, vector<int>& dst, |
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: parameter 'from' is unused [misc-unused-parameters]
void Dijkstra(int v, int from, vector<int>& vis, vector<int>& dst, | |
void Dijkstra(int v, int /*from*/, vector<int>& vis, vector<int>& dst, |
return dst; | ||
} | ||
|
||
void Dijkstra(int v, int from, vector<int>& vis, vector<int>& dst, |
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: parameter 'vis' is unused [misc-unused-parameters]
void Dijkstra(int v, int from, vector<int>& vis, vector<int>& dst, | |
void Dijkstra(int v, int from, vector<int>& /*vis*/, vector<int>& dst, |
} | ||
|
||
void Dijkstra(int v, int from, vector<int>& vis, vector<int>& dst, | ||
const AdjacencyList adj) { |
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: the const qualified parameter 'adj' is copied for each invocation; consider making it a reference [performance-unnecessary-value-param]
lib/src/util.hpp:9:
- const AdjacencyList);
+ const AdjacencyList&);
const AdjacencyList adj) { | |
const AdjacencyList& adj) { |
Pronin Arkadiy's Tasks