Skip to content
Merged
5 changes: 4 additions & 1 deletion .clang-tidy
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@ Checks: >
cppcoreguidelines-avoid-capturing-lambda-coroutines,
cppcoreguidelines-avoid-goto,
cppcoreguidelines-avoid-non-const-global-variables,
cppcoreguidelines-avoid-reference-coroutine-parameters
cppcoreguidelines-avoid-reference-coroutine-parameters,
cppcoreguidelines-interfaces-global-init,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Remove the trailing comma

cppcoreguidelines-rvalue-reference-param-not-moved,
cppcoreguidelines-pro-type-member-init
Comment thread
cvvergara marked this conversation as resolved.
Outdated

WarningsAsErrors: ''
HeaderFilterRegex: './include'
Expand Down
4 changes: 2 additions & 2 deletions include/cpp_common/path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ class Path {
std::deque< Path_t > path;
int64_t m_start_id;
int64_t m_end_id;
double m_tot_cost;
double m_tot_cost{0};
Comment thread
coderabbitai[bot] marked this conversation as resolved.

public:
Path(): m_start_id(0), m_end_id(0), m_tot_cost(0)
Path() : m_start_id(0), m_end_id(0), m_tot_cost(0)
{}
Path(int64_t s_id, int64_t e_id)
: m_start_id(s_id), m_end_id(e_id), m_tot_cost(0)
Expand Down
2 changes: 1 addition & 1 deletion src/max_flow/minCostMaxFlow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ PgrCostFlowGraph::GetFlowEdges() const {
if (((capacity[*e] - residual_capacity[*e]) > 0) &&
((*e).m_source != supersource) &&
((*e).m_target != supersink)) {
Flow_t edge;
Flow_t edge{};
edge.edge = GetEdgeId(*e);
edge.source = GetVertexId((*e).m_source);
edge.target = GetVertexId((*e).m_target);
Expand Down