Skip to content

Commit 5d8af06

Browse files
committed
Remove move semantics from addManifest
There is no reason to use move for a shared smart pointer. Let the pointer control block deal with the references.
1 parent 1602cdf commit 5d8af06

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/gridcoin/scraper/scraper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -4271,7 +4271,7 @@ bool ScraperSendFileManifestContents(CBitcoinAddress& Address, CKey& Key) EXCLUS
42714271

42724272
LOCK2(CScraperManifest::cs_mapManifest, CSplitBlob::cs_mapParts);
42734273

4274-
bool bAddManifestSuccessful = CScraperManifest::addManifest(std::move(manifest), Key);
4274+
bool bAddManifestSuccessful = CScraperManifest::addManifest(manifest, Key);
42754275

42764276
if (bAddManifestSuccessful)
42774277
_log(logattribute::INFO, "ScraperSendFileManifestContents", "addManifest (send) from this scraper (address "

src/gridcoin/scraper/scraper_net.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -756,7 +756,7 @@ bool CScraperManifest::RecvManifest(CNode* pfrom, CDataStream& vRecv)
756756
return true;
757757
}
758758

759-
bool CScraperManifest::addManifest(std::shared_ptr<CScraperManifest>&& m, CKey& keySign)
759+
bool CScraperManifest::addManifest(std::shared_ptr<CScraperManifest> m, CKey& keySign)
760760
EXCLUSIVE_LOCKS_REQUIRED(CScraperManifest::cs_mapManifest, cs_mapParts)
761761
{
762762
uint256 hash;

src/gridcoin/scraper/scraper_net.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ class CScraperManifest
125125
static bool SendManifestTo(CNode* pfrom, const uint256& hash);
126126

127127
/** Add new manifest object into list of known manifests */
128-
static bool addManifest(std::shared_ptr<CScraperManifest>&& m, CKey& keySign);
128+
static bool addManifest(std::shared_ptr<CScraperManifest> m, CKey& keySign);
129129

130130
/** Validate whether received manifest is authorized */
131131
static bool IsManifestAuthorized(int64_t& nTime, CPubKey& PubKey, unsigned int& banscore_out);

0 commit comments

Comments
 (0)