From 1d7d1f36ca1b0a0349395d6ea4aeece6fff13d7f Mon Sep 17 00:00:00 2001 From: achabense <60953653+achabense@users.noreply.github.com> Date: Wed, 19 Jul 2023 14:36:48 +0800 Subject: [PATCH] /*const*/ size_type _Target_capacity --- stl/inc/xstring | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stl/inc/xstring b/stl/inc/xstring index dfd6f7e539b..ff32dec1870 100644 --- a/stl/inc/xstring +++ b/stl/inc/xstring @@ -3992,7 +3992,7 @@ public: return; } - const size_type _Target_capacity = (_STD min)(_My_data._Mysize | _ALLOC_MASK, max_size()); + size_type _Target_capacity = (_STD min)(_My_data._Mysize | _ALLOC_MASK, max_size()); if (_Target_capacity < _My_data._Myres) { // worth shrinking, do it auto& _Al = _Getal(); const pointer _New_ptr = _Allocate_for_capacity(_Al, _Target_capacity); // throws