diff options
author | fanquake <fanquake@gmail.com> | 2021-03-22 11:22:06 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2021-03-22 11:22:06 +0800 |
commit | 5294f0d5a94cc7beaf692131fba0cad8beec9f13 (patch) | |
tree | ab68899a7525ad0a6747aaba04762dc98c73e032 /src/init.cpp | |
parent | d2a78ee9288e4d3bace9125bcfae6b7747f85982 (diff) |
refactor: return std::nullopt instead of {}
In #21415 we decided to return `std::optional` rather than `{}` for
uninitialized values. This PR repalces the two remaining usages of `{}`
with `std::nullopt`.
As a side-effect, this also quells the spurious GCC 10.2.x warning that
we've had reported quite a few times. i.e #21318, #21248, #20797.
```bash
txmempool.cpp: In member function ‘CTxMemPool::setEntries CTxMemPool::GetIterSet(const std::set<uint256>&) const’:
txmempool.cpp:898:13: warning: ‘<anonymous>’ may be used uninitialized in this function [-Wmaybe-uninitialized]
898 | return {};
| ^
```
Diffstat (limited to 'src/init.cpp')
0 files changed, 0 insertions, 0 deletions