Fix 64-bit benchmark build
The * flag to printf() wants an int instead of size_t, and these are distinct types on 64-bit. To accomodate this, make the name column width helpers return int. In theory this truncates things, but in practice this only matters if you have a benchmark with more than INT_MAX characters in its name (in which case you have bigger problems). Change-Id: I3338948c25a3a8d84f1ead2f5b457c05da8a01cf Signed-off-by: Greg Hackmann <ghackmann@google.com>
This commit is contained in:
@@ -44,8 +44,8 @@ std::vector<Benchmark*>& Benchmark::List() {
|
||||
return list;
|
||||
}
|
||||
|
||||
size_t Benchmark::MaxNameColumnWidth() {
|
||||
size_t max = 20;
|
||||
int Benchmark::MaxNameColumnWidth() {
|
||||
int max = 20;
|
||||
for (auto& benchmark : List()) {
|
||||
max = std::max(max, benchmark->NameColumnWidth());
|
||||
}
|
||||
|
Reference in New Issue
Block a user