mirror of
https://github.com/google/benchmark.git
synced 2025-04-29 14:30:37 +08:00
perf_counters: Make success var const
This commit is contained in:
parent
cb5fc2d77a
commit
71a7d88530
@ -61,7 +61,9 @@ const bool PerfCounters::kSupported = true;
|
||||
// initialization was successful
|
||||
static bool InitLibPfmOnce() {
|
||||
// Function-scope static gets initialized only once on first call.
|
||||
static bool success = []() { return pfm_initialize() == PFM_SUCCESS; }();
|
||||
static const bool success = []() {
|
||||
return pfm_initialize() == PFM_SUCCESS;
|
||||
}();
|
||||
return success;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user