mirror of https://github.com/jarro2783/cxxopts.git
fix: Don't capture unused variables, and don't capture by reference unnecessarily
This commit is contained in:
parent
90a32f5af1
commit
79d5698253
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue