From bad9e86d717a0b784bae12c73a6ee8652cf68255 Mon Sep 17 00:00:00 2001 From: Gregory A Lundberg Date: Thu, 25 Oct 2018 19:29:57 -0500 Subject: [PATCH] Codacy: Error-prone Code %i in format string requires 'int' but the argument type is 'unsigned int'. --- src/attack_prediction.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/attack_prediction.cpp b/src/attack_prediction.cpp index 868c9b440f67..20e4e1d1615f 100644 --- a/src/attack_prediction.cpp +++ b/src/attack_prediction.cpp @@ -2707,12 +2707,12 @@ static void run(unsigned specific_battle) auto total = end - start; #ifdef BENCHMARK - printf("Total time for %i combats was %lf\n", NUM_UNITS * (NUM_UNITS - 1) * (NUM_UNITS - 2), + printf("Total time for %u combats was %lf\n", NUM_UNITS * (NUM_UNITS - 1) * (NUM_UNITS - 2), static_cast(duration_cast(total).count()) / 1000000.0); printf("Time per calc = %li us\n", static_cast(duration_cast(total).count()) / (NUM_UNITS * (NUM_UNITS - 1) * (NUM_UNITS - 2))); #else - printf("Total combats: %i\n", NUM_UNITS * (NUM_UNITS - 1) * (NUM_UNITS - 2)); + printf("Total combats: %u\n", NUM_UNITS * (NUM_UNITS - 1) * (NUM_UNITS - 2)); #endif for(i = 0; i < NUM_UNITS; ++i) {