]> git.tdb.fi Git - r2c2.git/blobdiff - source/libr2c2/speedquantizer.cpp
Improve the interface and algorithms of BlockAllocator
[r2c2.git] / source / libr2c2 / speedquantizer.cpp
index 9fa127cb3125fcce5868416d71535558d98195e8..fa7a4be8b31311d348118cb47c4237e0e59ae8c7 100644 (file)
@@ -82,7 +82,7 @@ unsigned SpeedQuantizer::find_speed_step(float speed) const
                        else
                                return 0;
                }
-               return min(min(static_cast<unsigned>(low*speed/steps[low].speed), steps.size()-1), last+limit);
+               return min(min<unsigned>(low*speed/steps[low].speed, steps.size()-1), last+limit);
        }
 
        float f = (speed-steps[low].speed)/(steps[high].speed-steps[low].speed);