Skip to content

Commit

Permalink
_moveInternBase implemented a little nicer
Browse files Browse the repository at this point in the history
  • Loading branch information
OleErikPeistorpet committed May 7, 2024
1 parent c87741e commit 8a34d8b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions dynarray.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,8 +324,9 @@ class dynarray

void _moveInternBase(_internBase & src) noexcept
{
static_cast<_internBase &>(_m) = src;
src.reservEnd = src.end = src.data = nullptr;
_internBase & dest = _m;
dest = src;
src = {};
}

void _swapAlloc([[maybe_unused]] Alloc & other) noexcept
Expand Down

0 comments on commit 8a34d8b

Please sign in to comment.