summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2025-04-16 00:14:46 +0100
committerSadie Powell <sadie@witchery.services>2025-04-16 00:14:46 +0100
commitd2aee394ea5bc91b132001fb5bf2457eec295432 (patch)
tree855732a85b5bc2dbe1e2ca2cfd9ab07ed88e3fcb
parent3e696fae0f30e12b13c0e932d022ce4b7427c3c8 (diff)
Fix a compiler warning on Clang.
-rw-r--r--src/misc.cpp6
1 files changed, 3 insertions, 3 deletions
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<Anope::string> 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)
{