File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -784,7 +784,7 @@ CostEstimate GraphNode::estimateCost() const {
784784 size_t estDepth = _options->estimateDepth ();
785785 double tmpNrItems = incoming * std::pow (baseNumItems, estDepth);
786786 // Protect against size_t overflow, just to be sure.
787- if (tmpNrItems > static_cast <double >(std::numeric_limits<size_t >::max ())) {
787+ if (tmpNrItems >= static_cast <double >(std::numeric_limits<size_t >::max ())) {
788788 // This will be an expensive query...
789789 estimate.estimatedNrItems = std::numeric_limits<size_t >::max ();
790790 } else {
Original file line number Diff line number Diff line change @@ -171,7 +171,7 @@ double ShortestPathOptions::estimateCost(size_t& nrItems) const {
171171 // This theory asumes that the shortest path is at most 7 steps of length
172172
173173 double tmp = std::pow (baseCreateItems, 7 );
174- nrItems = tmp > static_cast <double >(std::numeric_limits<size_t >::max ())
174+ nrItems = tmp >= static_cast <double >(std::numeric_limits<size_t >::max ())
175175 ? std::numeric_limits<size_t >::max ()
176176 : static_cast <size_t >(tmp);
177177 return std::pow (baseCost, 7 );
You can’t perform that action at this time.
0 commit comments