From d2aee394ea5bc91b132001fb5bf2457eec295432 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Wed, 16 Apr 2025 00:14:46 +0100 Subject: Fix a compiler warning on Clang. --- src/misc.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/misc.cpp') diff --git a/src/misc.cpp b/src/misc.cpp index 97b9d0604..40fac7db7 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -295,8 +295,7 @@ bool TextSplitter::GetLine(Anope::string &out) // Formatting which has been seen since the last space. std::vector uncertain_formatting; - size_t idx = 0; - auto toggle_formatting = [this, &idx, &uncertain_formatting](const Anope::string &fmt) + auto toggle_formatting = [this, &uncertain_formatting](const Anope::string &fmt) { auto it = std::find_if(formatting.begin(), formatting.end(), [&fmt](const auto& f) { return f[0] == fmt[0]; @@ -313,7 +312,8 @@ bool TextSplitter::GetLine(Anope::string &out) } }; - for (idx = 0; idx < text.length(); ++idx) + size_t idx = 0; + for ( ; idx < text.length(); ++idx) { if (current_length >= max_length) { -- cgit