Skip to content

Commit 72cc0f2

Browse files
committed
capture this
1 parent 63c4e24 commit 72cc0f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/evo/deterministicmns.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -235,22 +235,22 @@ class CDeterministicMNList
235235

236236
[[nodiscard]] size_t GetValidMNsCount() const
237237
{
238-
return ranges::count_if(mnMap, [](const auto& p){ return IsMNValid(*p.second); });
238+
return ranges::count_if(mnMap, [this](const auto& p){ return IsMNValid(*p.second); });
239239
}
240240

241241
[[nodiscard]] size_t GetAllHPMNsCount() const
242242
{
243-
return ranges::count_if(mnMap, [](const auto& p) { return p.second->nType == MnType::HighPerformance; });
243+
return ranges::count_if(mnMap, [this](const auto& p) { return p.second->nType == MnType::HighPerformance; });
244244
}
245245

246246
[[nodiscard]] size_t GetValidHPMNsCount() const
247247
{
248-
return ranges::count_if(mnMap, [](const auto& p) { return p.second->nType == MnType::HighPerformance && IsMNValid(*p.second); });
248+
return ranges::count_if(mnMap, [this](const auto& p) { return p.second->nType == MnType::HighPerformance && IsMNValid(*p.second); });
249249
}
250250

251251
[[nodiscard]] size_t GetValidWeightedMNsCount() const
252252
{
253-
return std::accumulate(mnMap.begin(), mnMap.end(), 0, [](auto res, const auto& p) {
253+
return std::accumulate(mnMap.begin(), mnMap.end(), 0, [this](auto res, const auto& p) {
254254
if (!IsMNValid(*p.second)) return res;
255255
return res + GetMnType(p.second->nType).voting_weight;
256256
});

0 commit comments

Comments
 (0)