summaryrefslogtreecommitdiffstats
path: root/benchmarks
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-06-12 12:52:58 -0700
committerElliott Hughes <enh@google.com>2014-06-12 12:52:58 -0700
commit5ab51d0d1af455afb22621dc3b75079d2b274929 (patch)
tree419648e8a9d55415bd9ac4ec769c7bc7876d2346 /benchmarks
parentd242aff47dc4eaa5081dc7af821308d353cd1090 (diff)
downloadbionic-5ab51d0d1af455afb22621dc3b75079d2b274929.zip
bionic-5ab51d0d1af455afb22621dc3b75079d2b274929.tar.gz
bionic-5ab51d0d1af455afb22621dc3b75079d2b274929.tar.bz2
Fix GCC 4.9 complaint about int/size_t mismatch.
Change-Id: Ib13857f98658dc8760cff15adb5829e8e140008a
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/benchmark_main.cpp5
1 files changed, 3 insertions, 2 deletions
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<std::string, ::testing::Benchmark*> 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<int>(strlen(it->second->Name()));
+ g_name_column_width = std::max(g_name_column_width, name_width);
}
bool need_header = true;