fix to prevent (very unlikely) overflow of originalEdges
If originalEdges gets initialized with 1 << 28, it will overflow and thereby be set to 0. Which defeats the point of checking for overflows in the first place.
This commit is contained in:
parent
fd57c5b48b
commit
5e8bdbfa0c
@ -47,7 +47,7 @@ class GraphContractor
|
||||
bool shortcut,
|
||||
bool forward,
|
||||
bool backward)
|
||||
: weight(weight), id(id), originalEdges(std::min((unsigned)1 << 28, original_edges)),
|
||||
: weight(weight), id(id), originalEdges(std::min((1u << 28) - 1u, original_edges)),
|
||||
shortcut(shortcut), forward(forward), backward(backward),
|
||||
is_original_via_node_ID(false)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user