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

additional tasks by Krivoruchko Dmitry #24

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

Conversation

UmbrellaLeaf5
Copy link
Contributor

No description provided.

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

additional_tasks/graph/src/main.cpp Outdated Show resolved Hide resolved
additional_tasks/graph/src/test.cpp Outdated Show resolved Hide resolved
additional_tasks/petya_and_vasya_labyrinth/src/a_star.hpp Outdated Show resolved Hide resolved
lib/src/graph/edge.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_size_t/edge.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_size_t/graph_construct.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_string/edge.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_string/graph_construct.cpp Outdated 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

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

lib/src/graph/for_integral/edge.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_integral/graph_construct.cpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated 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

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

lib/src/graph/for_integral/edge.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_integral/graph_construct.cpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated 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

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/for_integral/edge.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_integral/graph_construct.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_string/edge.cpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated 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

* алгоритму Тарьяна.
* @tparam vert_t: тип вершин
* @tparam weight_t: тип весов
* @param graph: исходный граф

Choose a reason for hiding this comment

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

warning: avoid do-while loops [cppcoreguidelines-avoid-do-while]

   do {
   ^

inline PetyaAndVasyaGraphs ParseMaze(
std::istream& is = std::cin,
SolutionType sol_type = SolutionType::ComplicatedBad) {
Graph<std::string, long> graph;

Choose a reason for hiding this comment

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

warning: enum 'SolutionType' uses a larger base type ('int', size: 4 bytes) than necessary for its value set, consider using 'std::uint8_t' (1 byte) as the base type to reduce its size [performance-enum-size]

a;
                  ^


template <AllowedVertType vert_t, AllowedWeightType weight_t>
const std::string& Graph<vert_t, weight_t>::Edge::Name() const {
static std::string name;

Choose a reason for hiding this comment

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

warning: variable 'name' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness]

Suggested change
static std::string name;
static std::string const name;

return Graph(edges);
}

template <AllowedVertType vert_t, AllowedWeightType weight_t>

Choose a reason for hiding this comment

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

warning: constructor does not initialize these fields: edges_, verts_ [cppcoreguidelines-pro-type-member-init]

template <AllowedVertType vert_t, AllowedWeightType weight_t>
^


template <AllowedVertType vert_t, AllowedWeightType weight_t>
const std::string& Graph<vert_t, weight_t>::Edge::Name() const {
static std::string name;

Choose a reason for hiding this comment

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

warning: variable 'name' of type 'std::string' (aka 'basic_string') can be declared 'const' [misc-const-correctness]

lib/src/graph/for_string/edge.cpp:7:

- name;
+ const name;

template class Graph<std::string, short>; \
template class Graph<std::string, int>; \
template class Graph<std::string, long>; \
template class Graph<std::string, size_t>; \

Choose a reason for hiding this comment

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

warning: constructor does not initialize these fields: start_vert_, end_vert_ [cppcoreguidelines-pro-type-member-init]

lib/src/graph/graph.hpp:405:

-    private:
-  end_vert_;
+    private:
+  end_vert_;{}{}

template class Graph<std::string, long>; \
template class Graph<std::string, size_t>; \
template class Graph<std::string, float>; \
template class Graph<std::string, double>; \

Choose a reason for hiding this comment

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

warning: constructor does not initialize these fields: start_vert_, end_vert_ [cppcoreguidelines-pro-type-member-init]

{end_vert} {}
                     ^

template class Graph<std::string, long double>

#define GRAPH_TEMPLATE_CONSTRUCT_FOR_INTEGRAL \
template class Graph<char, char>; \

Choose a reason for hiding this comment

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

warning: constructor does not initialize these fields: start_vert_, end_vert_ [cppcoreguidelines-pro-type-member-init]

eight} {}
                 ^

#define GRAPH_TEMPLATE_CONSTRUCT_FOR_INTEGRAL \
template class Graph<char, char>; \
template class Graph<char, short>; \
template class Graph<char, int>; \

Choose a reason for hiding this comment

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

warning: constructor does not initialize these fields: start_vert_, end_vert_ [cppcoreguidelines-pro-type-member-init]

t}, end_vert_{edge_pair.second} {}
                                          ^

bool Graph<vert_t, weight_t>::IsWeighted() const {
if (edges_.empty()) return false;

bool is_weighted = true;

Choose a reason for hiding this comment

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

warning: variable 'is_weighted' of type 'bool' can be declared 'const' [misc-const-correctness]

Suggested change
bool is_weighted = true;
alse;const

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/for_integral/edge.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_integral/graph_construct.cpp Outdated Show resolved Hide resolved
lib/src/graph/for_string/edge.cpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph.hpp Outdated Show resolved Hide resolved
lib/src/graph/graph_methods.cpp Outdated Show resolved Hide resolved
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