mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 11:57:28 -03:00
util: prevector's move ctor and move assignment is noexcept
Move operations already are `noexcept`, so add the keyword to the methods. This makes the `PrevectorFillVectorIndirect...` benchmarks about twice as fast on my machine, because otherwise `std::vector` has to use a copy when the vector resizes.
This commit is contained in:
parent
d380d2877e
commit
81f67977f5
1 changed files with 2 additions and 2 deletions
|
@ -264,7 +264,7 @@ public:
|
|||
fill(item_ptr(0), other.begin(), other.end());
|
||||
}
|
||||
|
||||
prevector(prevector<N, T, Size, Diff>&& other) {
|
||||
prevector(prevector<N, T, Size, Diff>&& other) noexcept {
|
||||
swap(other);
|
||||
}
|
||||
|
||||
|
@ -276,7 +276,7 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
prevector& operator=(prevector<N, T, Size, Diff>&& other) {
|
||||
prevector& operator=(prevector<N, T, Size, Diff>&& other) noexcept {
|
||||
swap(other);
|
||||
return *this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue