Skip to content

Commit

Permalink
address review
Browse files Browse the repository at this point in the history
  • Loading branch information
AviAvni committed Dec 26, 2023
1 parent 000dd3e commit 2ff1098
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion deps/FalkorDB-rs
10 changes: 5 additions & 5 deletions src/procedures/proc_sp_paths.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ static void addNeighbors
}

// get numeric attribute value of an entity otherwise return default value
static inline SIValue _get_value_or_defualt
static inline SIValue _get_value_or_default
(
GraphEntity *ge,
AttributeID id,
Expand Down Expand Up @@ -454,8 +454,8 @@ static void SPpaths_next
// if depth is 0 this is the source node, there is no leading edge to it.
// For depth > 0 for each frontier node, there is a leading edge.
if(depth > 0) {
SIValue c = _get_value_or_defualt((GraphEntity *)&frontierConnection.edge, ctx->cost_prop, SI_LongVal(1));
SIValue w = _get_value_or_defualt((GraphEntity *)&frontierConnection.edge, ctx->weight_prop, SI_LongVal(1));
SIValue c = _get_value_or_default((GraphEntity *)&frontierConnection.edge, ctx->cost_prop, SI_LongVal(1));
SIValue w = _get_value_or_default((GraphEntity *)&frontierConnection.edge, ctx->weight_prop, SI_LongVal(1));
if(p->cost + SI_GET_NUMERIC(c) <= ctx->max_cost && p->weight + SI_GET_NUMERIC(w) <= max_weight) {
p->cost += SI_GET_NUMERIC(c);
p->weight += SI_GET_NUMERIC(w);
Expand Down Expand Up @@ -489,8 +489,8 @@ static void SPpaths_next
Path_PopNode(ctx->path);
if(Path_EdgeCount(ctx->path)) {
Edge e = Path_PopEdge(ctx->path);
SIValue c = _get_value_or_defualt((GraphEntity *)&e, ctx->cost_prop, SI_LongVal(1));
SIValue w = _get_value_or_defualt((GraphEntity *)&e, ctx->weight_prop, SI_LongVal(1));
SIValue c = _get_value_or_default((GraphEntity *)&e, ctx->cost_prop, SI_LongVal(1));
SIValue w = _get_value_or_default((GraphEntity *)&e, ctx->weight_prop, SI_LongVal(1));
p->cost -= SI_GET_NUMERIC(c);
p->weight -= SI_GET_NUMERIC(w);
}
Expand Down
10 changes: 5 additions & 5 deletions src/procedures/proc_ss_paths.c
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ static void addNeighbors
}

// get numeric attribute value of an entity otherwise return default value
static inline SIValue _get_value_or_defualt
static inline SIValue _get_value_or_default
(
GraphEntity *ge,
AttributeID id,
Expand Down Expand Up @@ -449,8 +449,8 @@ static void SSpaths_next
// if depth is 0 this is the source node, there is no leading edge to it.
// for depth > 0 for each frontier node, there is a leading edge.
if(depth > 0) {
SIValue c = _get_value_or_defualt((GraphEntity *)&frontierConnection.edge, ctx->cost_prop, SI_LongVal(1));
SIValue w = _get_value_or_defualt((GraphEntity *)&frontierConnection.edge, ctx->weight_prop, SI_LongVal(1));
SIValue c = _get_value_or_default((GraphEntity *)&frontierConnection.edge, ctx->cost_prop, SI_LongVal(1));
SIValue w = _get_value_or_default((GraphEntity *)&frontierConnection.edge, ctx->weight_prop, SI_LongVal(1));
if(p->cost + SI_GET_NUMERIC(c) <= ctx->max_cost && p->weight + SI_GET_NUMERIC(w) <= max_weight) {
p->cost += SI_GET_NUMERIC(c);
p->weight += SI_GET_NUMERIC(w);
Expand Down Expand Up @@ -480,8 +480,8 @@ static void SSpaths_next
Path_PopNode(ctx->path);
if(Path_EdgeCount(ctx->path)) {
Edge e = Path_PopEdge(ctx->path);
SIValue c = _get_value_or_defualt((GraphEntity *)&e, ctx->cost_prop, SI_LongVal(1));
SIValue w = _get_value_or_defualt((GraphEntity *)&e, ctx->weight_prop, SI_LongVal(1));
SIValue c = _get_value_or_default((GraphEntity *)&e, ctx->cost_prop, SI_LongVal(1));
SIValue w = _get_value_or_default((GraphEntity *)&e, ctx->weight_prop, SI_LongVal(1));
p->cost -= SI_GET_NUMERIC(c);
p->weight -= SI_GET_NUMERIC(w);
}
Expand Down

0 comments on commit 2ff1098

Please sign in to comment.