From 5ab51d0d1af455afb22621dc3b75079d2b274929 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Thu, 12 Jun 2014 12:52:58 -0700 Subject: Fix GCC 4.9 complaint about int/size_t mismatch. Change-Id: Ib13857f98658dc8760cff15adb5829e8e140008a --- benchmarks/benchmark_main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'benchmarks') diff --git a/benchmarks/benchmark_main.cpp b/benchmarks/benchmark_main.cpp index cd80968..d60670b 100644 --- a/benchmarks/benchmark_main.cpp +++ b/benchmarks/benchmark_main.cpp @@ -32,7 +32,7 @@ static int64_t g_benchmark_start_time_ns; typedef std::map BenchmarkMap; typedef BenchmarkMap::iterator BenchmarkMapIt; static BenchmarkMap g_benchmarks; -static size_t g_name_column_width = 20; +static int g_name_column_width = 20; static int Round(int n) { int base = 1; @@ -196,7 +196,8 @@ int main(int argc, char* argv[]) { } for (BenchmarkMapIt it = g_benchmarks.begin(); it != g_benchmarks.end(); ++it) { - g_name_column_width = std::max(g_name_column_width, strlen(it->second->Name())); + int name_width = static_cast(strlen(it->second->Name())); + g_name_column_width = std::max(g_name_column_width, name_width); } bool need_header = true; -- cgit v1.1