From d016d82d24c555be04c7c99ef24c3d278e086da3 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Sat, 17 Mar 2012 00:29:53 +0100 Subject: [PATCH] sizeof() should be concrete variables when possible. --- bayeswf.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bayeswf.cpp b/bayeswf.cpp index 7549553..f4f52d2 100644 --- a/bayeswf.cpp +++ b/bayeswf.cpp @@ -237,8 +237,8 @@ int main(int argc, char **argv) for (int j = 0; j < 1000; ++j) { float old_mu[MAX_PLAYERS]; float old_sigma[MAX_PLAYERS]; - memcpy(old_mu, mu, sizeof(float) * MAX_PLAYERS); - memcpy(old_sigma, sigma, sizeof(float) * MAX_PLAYERS); + memcpy(old_mu, mu, sizeof(mu)); + memcpy(old_sigma, sigma, sizeof(sigma)); for (int i = 0; i < num_players; ++i) { update_mu(mu, sigma, i, matches_for_player[i]); renormalize(mu, sigma, num_players); -- 2.39.5