diff options
author | fanquake <fanquake@gmail.com> | 2022-08-31 08:32:25 +0100 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-08-31 08:38:24 +0100 |
commit | 01e1627e25bc5477c40f51da03c3c31b609a85c9 (patch) | |
tree | 5d18df540e7ac416e093c8dc5264271ce92f4f0c /src/univalue/include/univalue.h | |
parent | d16ef40441dd32a154225bd3d29036ecfde71eb3 (diff) | |
parent | fa875349e22f2f0f9c2c98ee991372d08ff90318 (diff) |
Merge bitcoin/bitcoin#25872: Fix issues when calling std::move(const&)
fa875349e22f2f0f9c2c98ee991372d08ff90318 Fix iwyu (MacroFake)
faad673716cfbad1e715f1bdf8ac00938a055aea Fix issues when calling std::move(const&) (MacroFake)
Pull request description:
Passing a symbol to `std::move` that is marked `const` is a no-op, which can be fixed in two ways:
* Remove the `const`, or
* Remove the `std::move`
ACKs for top commit:
ryanofsky:
Code review ACK fa875349e22f2f0f9c2c98ee991372d08ff90318. Looks good. Good for univalue to support c++11 move optimizations
Tree-SHA512: 3dc5cad55b93cfa311abedfb811f35fc1b7f30a1c68561f15942438916c7de25e179c364be11881e01f844f9c2ccd71a3be55967ad5abd2f35b10bb7a882edea
Diffstat (limited to 'src/univalue/include/univalue.h')
-rw-r--r-- | src/univalue/include/univalue.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/univalue/include/univalue.h b/src/univalue/include/univalue.h index 8ba6fd5425..ccaf56a271 100644 --- a/src/univalue/include/univalue.h +++ b/src/univalue/include/univalue.h @@ -80,14 +80,14 @@ public: bool isArray() const { return (typ == VARR); } bool isObject() const { return (typ == VOBJ); } - void push_back(const UniValue& val); + void push_back(UniValue val); void push_backV(const std::vector<UniValue>& vec); template <class It> void push_backV(It first, It last); - void __pushKV(const std::string& key, const UniValue& val); - void pushKV(const std::string& key, const UniValue& val); - void pushKVs(const UniValue& obj); + void __pushKV(std::string key, UniValue val); + void pushKV(std::string key, UniValue val); + void pushKVs(UniValue obj); std::string write(unsigned int prettyIndent = 0, unsigned int indentLevel = 0) const; |