MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / ClipWeight

Method ClipWeight

src/extractor/compressed_edge_container.cpp:69–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67}
68
69SegmentWeight CompressedEdgeContainer::ClipWeight(const EdgeWeight weight)
70{
71 SegmentWeight seg_weight = alias_cast<SegmentWeight>(weight);
72 if (seg_weight >= INVALID_SEGMENT_WEIGHT)
73 {
74 clipped_weights++;
75 return MAX_SEGMENT_WEIGHT;
76 }
77 return seg_weight;
78}
79
80SegmentDuration CompressedEdgeContainer::ClipDuration(const EdgeDuration duration)
81{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected