-
Notifications
You must be signed in to change notification settings - Fork 23
semester_tasks #13
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?
semester_tasks #13
Conversation
(have some issues with packman algo)
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
task_01/src/test.cpp
Outdated
|
||
dg_1.AddDirEdge(0, 1); | ||
|
||
PackageManager packman_1(dg_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: variable 'packman_1' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_1(dg_1); | |
PackageManager const packman_1(dg_1); |
task_01/src/test.cpp
Outdated
|
||
dg_2.AddDirEdge(0, 1); | ||
|
||
PackageManager packman_2(dg_2); |
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 'packman_2' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_2(dg_2); | |
PackageManager const packman_2(dg_2); |
task_01/src/test.cpp
Outdated
dg_3.AddDirEdge(2, 3); | ||
dg_3.AddDirEdge(3, 4); | ||
|
||
PackageManager packman_3(dg_3); |
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 'packman_3' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_3(dg_3); | |
PackageManager const packman_3(dg_3); |
task_01/src/test.cpp
Outdated
dg_4.AddDirEdge(4, 6); | ||
dg_4.AddDirEdge(5, 7); | ||
dg_4.AddDirEdge(6, 7); | ||
PackageManager packman_4(dg_4); |
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 'packman_4' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_4(dg_4); | |
PackageManager const packman_4(dg_4); |
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
task_01/src/test.cpp
Outdated
|
||
dg_1.AddDirEdge(0, 1); | ||
|
||
PackageManager packman_1(dg_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: variable 'packman_1' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_1(dg_1); | |
PackageManager const packman_1(dg_1); |
task_01/src/test.cpp
Outdated
|
||
dg_2.AddDirEdge(0, 1); | ||
|
||
PackageManager packman_2(dg_2); |
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 'packman_2' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_2(dg_2); | |
PackageManager const packman_2(dg_2); |
task_01/src/test.cpp
Outdated
dg_3.AddDirEdge(2, 3); | ||
dg_3.AddDirEdge(3, 4); | ||
|
||
PackageManager packman_3(dg_3); |
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 'packman_3' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_3(dg_3); | |
PackageManager const packman_3(dg_3); |
task_01/src/test.cpp
Outdated
dg_4.AddDirEdge(4, 6); | ||
dg_4.AddDirEdge(5, 7); | ||
dg_4.AddDirEdge(6, 7); | ||
PackageManager packman_4(dg_4); |
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 'packman_4' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_4(dg_4); | |
PackageManager const packman_4(dg_4); |
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
lib/src/graph.hpp
Outdated
} | ||
|
||
protected: | ||
std::vector<std::shared_ptr<Vertex<T>>> vertices_; |
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: member variable 'vertices_' has protected visibility [cppcoreguidelines-non-private-member-variables-in-classes]
std::vector<std::shared_ptr<Vertex<T>>> vertices_;
^
task_01/src/test.cpp
Outdated
|
||
dg_1.AddDirEdge(0, 1); | ||
|
||
PackageManager packman_1(dg_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: variable 'packman_1' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_1(dg_1); | |
PackageManager const packman_1(dg_1); |
task_01/src/test.cpp
Outdated
|
||
dg_2.AddDirEdge(0, 1); | ||
|
||
PackageManager packman_2(dg_2); |
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 'packman_2' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_2(dg_2); | |
PackageManager const packman_2(dg_2); |
task_01/src/test.cpp
Outdated
dg_3.AddDirEdge(2, 3); | ||
dg_3.AddDirEdge(3, 4); | ||
|
||
PackageManager packman_3(dg_3); |
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 'packman_3' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_3(dg_3); | |
PackageManager const packman_3(dg_3); |
task_01/src/test.cpp
Outdated
dg_4.AddDirEdge(4, 6); | ||
dg_4.AddDirEdge(5, 7); | ||
dg_4.AddDirEdge(6, 7); | ||
PackageManager packman_4(dg_4); |
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 'packman_4' of type 'PackageManager' can be declared 'const' [misc-const-correctness]
PackageManager packman_4(dg_4); | |
PackageManager const packman_4(dg_4); |
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 40. Check the log or trigger a new build to see more.
}; | ||
|
||
template <typename T, typename VT> | ||
concept IsVertex = std::is_base_of<Vertex<VT>, T>::value; |
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: unknown type name 'concept' [clang-diagnostic-error]
concept IsVertex = std::is_base_of<Vertex<VT>, T>::value;
^
/// @tparam VertexType | ||
/// @tparam T | ||
template <typename VertexType, typename T> | ||
requires IsVertex<VertexType, T> |
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: expected ';' at end of declaration [clang-diagnostic-error]
requires IsVertex<VertexType, T> | |
requires IsVertex<VertexType, T>; |
/// @tparam VertexType | ||
/// @tparam T | ||
template <typename VertexType, typename T> | ||
requires IsVertex<VertexType, T> |
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: unknown type name 'requires' [clang-diagnostic-error]
requires IsVertex<VertexType, T>
^
/// @tparam VertexType | ||
/// @tparam T | ||
template <typename VertexType, typename T> | ||
requires IsVertex<VertexType, T> |
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 template partial specialization does not specialize any template argument; to define the primary template, remove the template argument list [clang-diagnostic-error]
requires IsVertex<VertexType, T> | |
requires IsVertex |
/// @tparam T | ||
template <typename VertexType, typename T> | ||
requires IsVertex<VertexType, T> | ||
class Graph { |
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: constructor does not initialize these fields: vertices_ [cppcoreguidelines-pro-type-member-init]
lib/src/graph.hpp:209:
- std::vector<std::shared_ptr<VertexType>> vertices_;
+ std::vector<std::shared_ptr<VertexType>> vertices_{};
* @param vertex | ||
* @return size_t | ||
*/ | ||
size_t Find(const T &vertex) const { |
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: unknown type name 'T' [clang-diagnostic-error]
size_t Find(const T &vertex) const {
^
* Remove a vertex from the graph | ||
* @param vertex | ||
*/ | ||
virtual void RemoveVertex(std::shared_ptr<VertexType> vertex) { |
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: use of undeclared identifier 'VertexType' [clang-diagnostic-error]
virtual void RemoveVertex(std::shared_ptr<VertexType> vertex) {
^
* @param source | ||
* @param target | ||
*/ | ||
virtual void AddDirEdge(std::shared_ptr<VertexType> source, |
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: use of undeclared identifier 'VertexType' [clang-diagnostic-error]
virtual void AddDirEdge(std::shared_ptr<VertexType> source,
^
* @param target | ||
*/ | ||
virtual void AddDirEdge(std::shared_ptr<VertexType> source, | ||
std::shared_ptr<VertexType> target) { |
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: use of undeclared identifier 'VertexType' [clang-diagnostic-error]
std::shared_ptr<VertexType> target) {
^
* @param source | ||
* @param target | ||
*/ | ||
virtual void RemoveDirEdge(std::shared_ptr<VertexType> source, |
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: use of undeclared identifier 'VertexType' [clang-diagnostic-error]
virtual void RemoveDirEdge(std::shared_ptr<VertexType> source,
^
topology sort algorithm (further will be extended to package manger simulating prorgram)