From 7cae968bff6a760f4c46f2505c4ff2aec4b915cd Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Sun, 27 Apr 2014 12:57:25 -0700 Subject: Make manifest_parser_perftest build on Windows. --- src/manifest_parser_perftest.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/manifest_parser_perftest.cc b/src/manifest_parser_perftest.cc index ed3a89a..e40468f 100644 --- a/src/manifest_parser_perftest.cc +++ b/src/manifest_parser_perftest.cc @@ -19,8 +19,10 @@ #include #ifdef _WIN32 +#include "getopt.h" #include #else +#include #include #endif @@ -107,6 +109,6 @@ int main(int argc, char* argv[]) { int min = *min_element(times.begin(), times.end()); int max = *max_element(times.begin(), times.end()); - float total = accumulate(times.begin(), times.end(), 0); + float total = accumulate(times.begin(), times.end(), 0.0f); printf("min %dms max %dms avg %.1fms\n", min, max, total / times.size()); } -- cgit v0.12