Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13115700
D6165.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
817 B
Subscribers
None
D6165.diff
View Options
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
Details
Attached
Mime Type
text/plain
Expires
Sat, Mar 1, 11:47 (3 h, 20 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5186518
Default Alt Text
D6165.diff (817 B)
Attached To
D6165: [backport#16995] refactor: Work around GCC 9 `-Wredundant-move` warning
Event Timeline
Log In to Comment