Skip to content

Commit 364e3ec

Browse files
committed
fix: fib bench on windows
1 parent 1749a44 commit 364e3ec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/google_benchmark_cmake/fibonacci_bench.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ static uint64_t fibonacci_recursive(int n) {
88
}
99

1010
static void BM_FibonacciRecursive(benchmark::State& state) {
11-
int n = state.range(0);
11+
int n = static_cast<int>(state.range(0));
1212
for (auto _ : state) {
1313
uint64_t result = fibonacci_recursive(n);
1414
benchmark::DoNotOptimize(result);
@@ -29,7 +29,7 @@ static uint64_t fibonacci_iterative(int n) {
2929
}
3030

3131
static void BM_FibonacciIterative(benchmark::State& state) {
32-
int n = state.range(0);
32+
int n = static_cast<int>(state.range(0));
3333
for (auto _ : state) {
3434
uint64_t result = fibonacci_iterative(n);
3535
benchmark::DoNotOptimize(result);

0 commit comments

Comments
 (0)