From ec73bd71e18a7bede036cda0b6671fbf05cb2b3a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ion=20Gazta=C3=B1aga?= Date: Wed, 29 Dec 2021 17:30:15 +0100 Subject: [PATCH] Fix -Wshadow warnings --- include/boost/container/string.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/container/string.hpp b/include/boost/container/string.hpp index 9630099..7b4e572 100644 --- a/include/boost/container/string.hpp +++ b/include/boost/container/string.hpp @@ -2057,8 +2057,8 @@ class basic_string if (pos1 > this->size()) throw_out_of_range("basic_string::replace out of range position"); const size_type len = dtl::min_value(n1, this->size() - pos1); - const size_type max_size = this->max_size(); - if (n2 > max_size || (this->size() - len) >= (max_size - n2)) + const size_type max_sz = this->max_size(); + if (n2 > max_sz || (this->size() - len) >= (max_sz - n2)) throw_length_error("basic_string::replace max_size() exceeded"); const pointer addr = this->priv_addr() + pos1; return this->replace(addr, addr + difference_type(len), s, s + difference_type(n2));