Skip to content
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

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

Conversation

EchoPr
Copy link

@EchoPr EchoPr commented Dec 5, 2024

Pronin Arkadiy's Tasks

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 16. Check the log or trigger a new build to see more.

lib/src/graph.cpp Outdated Show resolved Hide resolved
lib/src/graph.cpp Outdated Show resolved Hide resolved
lib/src/graph.cpp Show resolved Hide resolved
lib/src/graph.cpp Show resolved Hide resolved
lib/src/graph.cpp Outdated Show resolved Hide resolved
task_01/src/main.cpp Show resolved Hide resolved
task_01/src/test.cpp Show resolved Hide resolved
task_02/src/main.cpp Show resolved Hide resolved
task_02/src/test.cpp Show resolved Hide resolved
task_04/src/main.cpp Show resolved Hide resolved
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

lib/src/graph.cpp Outdated Show resolved Hide resolved
lib/src/graph.cpp Outdated Show resolved Hide resolved
lib/src/graph.cpp Show resolved Hide resolved
lib/src/graph.cpp Show resolved Hide resolved
lib/src/graph.cpp Outdated Show resolved Hide resolved
lib/src/util.cpp Show resolved Hide resolved
lib/src/util.cpp Show resolved Hide resolved
lib/src/util.cpp Show resolved Hide resolved
task_04/src/test.cpp Show resolved Hide resolved
EchoPr and others added 2 commits December 14, 2024 17:04
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>
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

lib/src/graph.cpp Show resolved Hide resolved
lib/src/graph.cpp Show resolved Hide resolved
lib/src/graph.cpp Show resolved Hide resolved
lib/src/graph.cpp Show resolved Hide resolved
lib/src/util.cpp Show resolved Hide resolved
lib/src/util.cpp Show resolved Hide resolved
lib/src/util.cpp Show resolved Hide resolved
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

#include <iostream>
#include <stdexcept>

#define UNREACHABLE (-1)

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)

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]

Suggested change
enum {
UNREACHABLE = (-1)};


void Graph::PrintGraph() const {
if (vertexes_num == 0) {
std::cerr << "Error: Graph is empty." << std::endl;

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]

Suggested change
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,

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]

Suggested change
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,

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]

Suggested change
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) {

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&);
Suggested change
const AdjacencyList adj) {
const AdjacencyList& adj) {

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