Skip to content

Commit

Permalink
Explicitly capture "columnCount" variable in lambda.
Browse files Browse the repository at this point in the history
  • Loading branch information
przemek83 committed Dec 29, 2024
1 parent 5356a54 commit 416b9e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ImportSpreadsheet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,8 @@ bool ImportSpreadsheet::columnsToExcludeAreValid(
const QVector<unsigned int>& excludedColumns, unsigned int columnCount)
{
const auto it = std::find_if(excludedColumns.begin(), excludedColumns.end(),
[=](unsigned int column)
{ return column >= columnCount; });
[count = columnCount](unsigned int column)
{ return column >= count; });
if (it != excludedColumns.end())
{
setError("Column to exclude " + QString::number(*it) +
Expand Down

0 comments on commit 416b9e8

Please sign in to comment.