am b67a3c27: Merge "Fix GCC 4.9 complaint about int/size_t mismatch."

* commit 'b67a3c271616d7b2506ead15e97c6a840b5eb5a8':
  Fix GCC 4.9 complaint about int/size_t mismatch.
This commit is contained in:
Elliott Hughes 2014-06-12 20:00:08 +00:00 committed by Android Git Automerger
commit 9e57d478ec

View File

@ -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;