From: Steinar H. Gunderson Date: Sun, 21 Oct 2007 12:55:07 +0000 (+0200) Subject: Another reserve(). X-Git-Url: https://git.sesse.net/?p=foosball;a=commitdiff_plain;h=dc5cd889a0974158d132784310dbad658f10ba12 Another reserve(). --- diff --git a/foosrank.cpp b/foosrank.cpp index b0f3042..dd1f905 100644 --- a/foosrank.cpp +++ b/foosrank.cpp @@ -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])));