Skip to content
Merged
9 changes: 4 additions & 5 deletions include/cpp_common/path.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ 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)
{}
Path(int64_t s_id, int64_t e_id)
: m_start_id(s_id), m_end_id(e_id), m_tot_cost(0)
: m_start_id(s_id), m_end_id(e_id)
{}

int64_t start_id() const {return m_start_id;}
Expand Down Expand Up @@ -178,8 +178,7 @@ class Path {
const Path &original,
bool only_cost) :
m_start_id(original.m_start_id),
m_end_id(original.m_end_id),
m_tot_cost(0) {
m_end_id(original.m_end_id) {
if (original.path.empty()) return;

typename G::EO_i ei, ei_end;
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
Loading