]> git.sesse.net Git - foosball/commitdiff
Another reserve().
authorSteinar H. Gunderson <sesse@debian.org>
Sun, 21 Oct 2007 12:55:07 +0000 (14:55 +0200)
committerSteinar H. Gunderson <sesse@debian.org>
Sun, 21 Oct 2007 12:55:07 +0000 (14:55 +0200)
foosrank.cpp

index b0f30424ff7e6e7f7040f14356ff2651193e6211..dd1f905f9cd92110d45b431eea8b2ff6545915e9 100644 (file)
@@ -141,6 +141,8 @@ static void compute_opponent_rating_pdf(int k, int a, double mu2, double sigma2,
                res[i] = func1[i] * func2[i];
        }
        fftw_execute(b);
+
+       result.reserve(sz);
        for (int i = 0; i < sz; ++i) {
                double r1 = i*h;
                result.push_back(make_pair(r1, abs(res[i])));