mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-09 03:18:09 -03:00
refactor: Simplify SpanPopBack
Use the equivalent back() and first() member functions.
This commit is contained in:
parent
facc4f120b
commit
faae6fa5f6
1 changed files with 2 additions and 3 deletions
|
@ -248,9 +248,8 @@ template <typename T>
|
|||
T& SpanPopBack(Span<T>& span)
|
||||
{
|
||||
size_t size = span.size();
|
||||
ASSERT_IF_DEBUG(size > 0);
|
||||
T& back = span[size - 1];
|
||||
span = Span<T>(span.data(), size - 1);
|
||||
T& back = span.back();
|
||||
span = span.first(size - 1);
|
||||
return back;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue