fix: Fix shadow declaration of end

This commit is contained in:
Nitin Kumar 2026-04-16 17:21:18 +05:30
parent edbfbad35b
commit d29fcebc56
1 changed files with 4 additions and 4 deletions

View File

@ -2231,7 +2231,7 @@ wrap_text
auto size = std::size_t{}; auto size = std::size_t{};
bool firstLine = true; bool firstLine = true;
const auto end = std::end(text); const auto textEnd = std::end(text);
// Loop invariants at the beginning of each iteration: // Loop invariants at the beginning of each iteration:
// 1 - [std::begin(text), startLine) is already added to result // 1 - [std::begin(text), startLine) is already added to result
@ -2284,7 +2284,7 @@ wrap_text
}; };
for (; current != end; ++current) for (; current != textEnd; ++current)
{ {
const auto currentNext = std::next(current); const auto currentNext = std::next(current);
@ -2294,7 +2294,7 @@ wrap_text
// Last character is a newline. Hence there is another line to be added. An empty one // Last character is a newline. Hence there is another line to be added. An empty one
// And we need to do that now as we don't be doing further iterations // And we need to do that now as we don't be doing further iterations
if(currentNext == end) { if(currentNext == textEnd) {
add_line(currentNext, currentNext); add_line(currentNext, currentNext);
} }
@ -2306,7 +2306,7 @@ wrap_text
bool endHere = false; bool endHere = false;
auto endLine = currentNext; auto endLine = currentNext;
if(currentNext == end) { if(currentNext == textEnd) {
endHere = true; endHere = true;
} }
else if(is_space(current) && size == 1) { else if(is_space(current) && size == 1) {