1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-06-25 22:43:14 +00:00

Do not capture by reference in inner_product lambda

This commit is contained in:
Carles Fernandez 2020-06-30 15:29:30 +02:00
parent e652b2335d
commit c4652c4593
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
2 changed files with 4 additions and 4 deletions

View File

@ -107,9 +107,9 @@ void bm_inner_product(benchmark::State& state)
#if COMPILER_HAS_STD_PLUS_VOID
std::plus<>(),
#else
std::plus<float>(),
std::plus<int32_t>(),
#endif
[&](float a, float b) { return (std::signbit(a) ? -b : b); });
[](float a, int32_t b) { return (std::signbit(a) ? -b : b); });
}
}

View File

@ -95,9 +95,9 @@ TEST(PreambleCorrelationTest, TestMethods)
#if COMPILER_HAS_STD_PLUS_VOID
std::plus<>(),
#else
std::plus<float>(),
std::plus<int32_t>(),
#endif
[&](float a, float b) { return (std::signbit(a) ? -b : b); });
[](float a, int32_t b) { return (std::signbit(a) ? -b : b); });
sum_corr3 += corr_value3;
}
end3 = std::chrono::system_clock::now();