Skip to content

Commit

Permalink
Logic cleanups for basic_string (#3862)
Browse files Browse the repository at this point in the history
Co-authored-by: Stephan T. Lavavej <[email protected]>
Co-authored-by: Casey Carter <[email protected]>
  • Loading branch information
3 people authored Aug 11, 2023
1 parent c623688 commit 29fc1c9
Show file tree
Hide file tree
Showing 5 changed files with 172 additions and 168 deletions.
10 changes: 5 additions & 5 deletions stl/inc/sstream
Original file line number Diff line number Diff line change
Expand Up @@ -473,11 +473,11 @@ protected:
}

// finite buffer that can be read or written, set it up
auto [_Ptr, _Size, _Res] = _Str._Release_to_buffer(_Al);
_Elem* const _Pnew = _Unfancy(_Ptr);
_Seekhigh = _Pnew + _Size;
auto _Next = (_State & (_Atend | _Append)) ? _Seekhigh : _Pnew;
auto _End_buffer = _Pnew + _Res;
auto [_Ptr, _Size, _Actual_allocation_size] = _Str._Release_to_buffer(_Al);
_Elem* const _Pnew = _Unfancy(_Ptr);
_Seekhigh = _Pnew + _Size;
auto _Next = (_State & (_Atend | _Append)) ? _Seekhigh : _Pnew;
auto _End_buffer = _Pnew + _Actual_allocation_size;

_Mysb::setp(_Pnew, _Next, _End_buffer);
if (_State & _Noread) { // maintain "_Allocated == eback() points to buffer base" invariant
Expand Down
Loading

0 comments on commit 29fc1c9

Please sign in to comment.