Page MenuHomePhabricator

D6165.diff
No OneTemporary

D6165.diff

diff --git a/src/interfaces/chain.cpp b/src/interfaces/chain.cpp
--- a/src/interfaces/chain.cpp
+++ b/src/interfaces/chain.cpp
@@ -258,11 +258,13 @@
class ChainImpl : public Chain {
public:
std::unique_ptr<Chain::Lock> lock(bool try_lock) override {
- auto result = std::make_unique<LockImpl>(
+ auto lock = std::make_unique<LockImpl>(
::cs_main, "cs_main", __FILE__, __LINE__, try_lock);
- if (try_lock && result && !*result) {
+ if (try_lock && lock && !*lock) {
return {};
}
+ // Temporary to avoid CWG 1579
+ std::unique_ptr<Chain::Lock> result = std::move(lock);
return result;
}
bool findBlock(const BlockHash &hash, CBlock *block, int64_t *time,

File Metadata

Mime Type
text/plain
Expires
Sat, Mar 1, 11:47 (6 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5186518
Default Alt Text
D6165.diff (817 B)

Event Timeline