Skip to content

Commit dd37054

Browse files
committed
fix: windows build
1 parent 8b31e14 commit dd37054

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/google_benchmark_cmake/memory_bench.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ static void BM_Vector_PushBack(benchmark::State& state) {
141141
for (auto _ : state) {
142142
std::vector<int> vec;
143143
for (size_t i = 0; i < count; ++i) {
144-
vec.push_back(i);
144+
vec.push_back(static_cast<int>(i));
145145
}
146146
benchmark::DoNotOptimize(vec);
147147
benchmark::ClobberMemory();
@@ -157,7 +157,7 @@ static void BM_Vector_Reserve(benchmark::State& state) {
157157
std::vector<int> vec;
158158
vec.reserve(count);
159159
for (size_t i = 0; i < count; ++i) {
160-
vec.push_back(i);
160+
vec.push_back(static_cast<int>(i));
161161
}
162162
benchmark::DoNotOptimize(vec);
163163
benchmark::ClobberMemory();

0 commit comments

Comments
 (0)