Skip to content

Commit

Permalink
Initialize pointer in basic_string::_Allocate_for_capacity (#4474)
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagomacarios committed Mar 16, 2024
1 parent a286993 commit 64d9a59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion stl/inc/xstring
Original file line number Diff line number Diff line change
Expand Up @@ -2615,7 +2615,7 @@ private:
_STL_INTERNAL_CHECK(_Capacity > _Small_string_capacity);
++_Capacity; // Take null terminator into consideration

pointer _Fancy_ptr;
pointer _Fancy_ptr = nullptr;
if constexpr (_Policy == _Allocation_policy::_At_least) {
_Fancy_ptr = _Allocate_at_least_helper(_Al, _Capacity);
} else {
Expand Down

0 comments on commit 64d9a59

Please sign in to comment.