summaryrefslogtreecommitdiffstats
path: root/src/manifest_parser_perftest.cc
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2014-04-27 19:57:25 (GMT)
committerNico Weber <nicolasweber@gmx.de>2014-04-27 19:57:25 (GMT)
commit7cae968bff6a760f4c46f2505c4ff2aec4b915cd (patch)
treead99d5bd5157c787e2992f0e5f272184c3a6a539 /src/manifest_parser_perftest.cc
parentfdabe7c74d426b0496a22198416898b3b701bb8d (diff)
downloadNinja-7cae968bff6a760f4c46f2505c4ff2aec4b915cd.zip
Ninja-7cae968bff6a760f4c46f2505c4ff2aec4b915cd.tar.gz
Ninja-7cae968bff6a760f4c46f2505c4ff2aec4b915cd.tar.bz2
Make manifest_parser_perftest build on Windows.
Diffstat (limited to 'src/manifest_parser_perftest.cc')
-rw-r--r--src/manifest_parser_perftest.cc4
1 files changed, 3 insertions, 1 deletions
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 <stdio.h>
#ifdef _WIN32
+#include "getopt.h"
#include <direct.h>
#else
+#include <getopt.h>
#include <unistd.h>
#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());
}