From 79d569825320a0131a761bae8ed48f6aa8fe1854 Mon Sep 17 00:00:00 2001 From: Nitin Kumar <59679977+lazysegtree@users.noreply.github.com> Date: Thu, 16 Apr 2026 17:40:13 +0530 Subject: [PATCH] fix: Don't capture unused variables, and don't capture by reference unnecessarily --- include/cxxopts.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/cxxopts.hpp b/include/cxxopts.hpp index 08779c8..bff8cde 100644 --- a/include/cxxopts.hpp +++ b/include/cxxopts.hpp @@ -2249,7 +2249,7 @@ wrap_text }; // Ensure when calling begin <= end - auto add_line = [&firstLine, &result, &is_space, &start](Iterator begin, Iterator end) { + auto add_line = [&firstLine, &result, start](Iterator begin, Iterator end) { // begin == end means empty line // Handle newlines, clamping, everything here if(!firstLine) { @@ -2271,7 +2271,7 @@ wrap_text // that [itr, current] doesn't contains any space. // either its called with itr = std::next(current) // or with an itr <= current in case of word splitting - auto reset_line_start = [&size, &startLine, &lastSpace, &contentEnd, &lastSpaceContentEnd, ¤t](Iterator itr, Iterator lineContentEnd) { + auto reset_line_start = [&size, &startLine, &lastSpace, &contentEnd, &lastSpaceContentEnd, current](Iterator itr, Iterator lineContentEnd) { startLine = itr; lastSpace = startLine; contentEnd = lineContentEnd;