Skip to content

Commit 3986ded

Browse files
committed
Merge #35: Avoid redundant std::move
2352178 Avoid redundant std::move (Pieter Wuille) Pull request description: I added this move initially because I believed the NVRO optimization didn't apply here (return type differs from variable type being returned). However, upon closer inspection this is not necessary: see "Automatic move from local variables and parameters" on https://en.cppreference.com/w/cpp/language/return, which states that even if the type differs, move-returning will be done if available. ACKs for top commit: jnewbery: ACK 2352178 theuni: ACK 2352178 Tree-SHA512: 6f8b8a3c1843d1b01df0e62983d918e6c08030a2aa74535c45a7cdc3a769322423fdfb8f2832043f06423427874fc5b90011cda5dde1c127c852ae4df02fdc74
2 parents 74345ec + 2352178 commit 3986ded

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/minisketch.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ class Minisketch
303303
ssize_t ret = minisketch_decode(m_minisketch.get(), max_elements, result.data());
304304
if (ret == -1) return {};
305305
result.resize(ret);
306-
return std::move(result);
306+
return result;
307307
}
308308

309309
/** C++17 only: similar to Decode(), but with specified false positive probability. */

0 commit comments

Comments
 (0)