@@ -189,7 +189,7 @@ bool CmdLineParser::fillSettingsFromArgs(int argc, const char* const argv[])
189
189
190
190
// Output a warning for the user if he tries to exclude headers
191
191
const std::vector<std::string>& ignored = getIgnoredPaths ();
192
- const bool warn = std::any_of (ignored.cbegin (), ignored.cend (), [](const std::string& i) {
192
+ const bool warn = std::any_of (ignored.cbegin (), ignored.cend (), [](const std::string& i) -> bool {
193
193
return Path::isHeader (i);
194
194
});
195
195
if (warn) {
@@ -210,7 +210,7 @@ bool CmdLineParser::fillSettingsFromArgs(int argc, const char* const argv[])
210
210
if (!mSettings .fileFilters .empty ()) {
211
211
// filter only for the selected filenames from all project files
212
212
PathMatch filtermatcher (mSettings .fileFilters , Path::getCurrentPath ());
213
- std::copy_if (fileSettingsRef.cbegin (), fileSettingsRef.cend (), std::back_inserter (fileSettings), [&](const FileSettings &fs) {
213
+ std::copy_if (fileSettingsRef.cbegin (), fileSettingsRef.cend (), std::back_inserter (fileSettings), [&](const FileSettings &fs) -> bool {
214
214
return filtermatcher.match (fs.filename ());
215
215
});
216
216
if (fileSettings.empty ()) {
@@ -228,11 +228,11 @@ bool CmdLineParser::fillSettingsFromArgs(int argc, const char* const argv[])
228
228
frontend::applyLang (fileSettings, mSettings , mEnforcedLang );
229
229
230
230
// sort the markup last
231
- std::copy_if (fileSettings.cbegin (), fileSettings.cend (), std::back_inserter (mFileSettings ), [&](const FileSettings &fs) {
231
+ std::copy_if (fileSettings.cbegin (), fileSettings.cend (), std::back_inserter (mFileSettings ), [&](const FileSettings &fs) -> bool {
232
232
return !mSettings .library .markupFile (fs.filename ()) || !mSettings .library .processMarkupAfterCode (fs.filename ());
233
233
});
234
234
235
- std::copy_if (fileSettings.cbegin (), fileSettings.cend (), std::back_inserter (mFileSettings ), [&](const FileSettings &fs) {
235
+ std::copy_if (fileSettings.cbegin (), fileSettings.cend (), std::back_inserter (mFileSettings ), [&](const FileSettings &fs) -> bool {
236
236
return mSettings .library .markupFile (fs.filename ()) && mSettings .library .processMarkupAfterCode (fs.filename ());
237
237
});
238
238
@@ -269,7 +269,7 @@ bool CmdLineParser::fillSettingsFromArgs(int argc, const char* const argv[])
269
269
while (it != filesResolved.end ()) {
270
270
const std::string& name = it->path ();
271
271
// TODO: log if duplicated files were dropped
272
- filesResolved.erase (std::remove_if (std::next (it), filesResolved.end (), [&](const FileWithDetails& entry) {
272
+ filesResolved.erase (std::remove_if (std::next (it), filesResolved.end (), [&](const FileWithDetails& entry) -> bool {
273
273
return entry.path () == name;
274
274
}), filesResolved.end ());
275
275
++it;
@@ -292,11 +292,11 @@ bool CmdLineParser::fillSettingsFromArgs(int argc, const char* const argv[])
292
292
frontend::applyLang (files, mSettings , mEnforcedLang );
293
293
294
294
// sort the markup last
295
- std::copy_if (files.cbegin (), files.cend (), std::inserter (mFiles , mFiles .end ()), [&](const FileWithDetails& entry) {
295
+ std::copy_if (files.cbegin (), files.cend (), std::inserter (mFiles , mFiles .end ()), [&](const FileWithDetails& entry) -> bool {
296
296
return !mSettings .library .markupFile (entry.path ()) || !mSettings .library .processMarkupAfterCode (entry.path ());
297
297
});
298
298
299
- std::copy_if (files.cbegin (), files.cend (), std::inserter (mFiles , mFiles .end ()), [&](const FileWithDetails& entry) {
299
+ std::copy_if (files.cbegin (), files.cend (), std::inserter (mFiles , mFiles .end ()), [&](const FileWithDetails& entry) -> bool {
300
300
return mSettings .library .markupFile (entry.path ()) && mSettings .library .processMarkupAfterCode (entry.path ());
301
301
});
302
302
@@ -2176,7 +2176,7 @@ std::list<FileWithDetails> CmdLineParser::filterFiles(const std::vector<std::str
2176
2176
const std::list<FileWithDetails>& filesResolved) {
2177
2177
std::list<FileWithDetails> files;
2178
2178
PathMatch filtermatcher (fileFilters, Path::getCurrentPath ());
2179
- std::copy_if (filesResolved.cbegin (), filesResolved.cend (), std::inserter (files, files.end ()), [&](const FileWithDetails& entry) {
2179
+ std::copy_if (filesResolved.cbegin (), filesResolved.cend (), std::inserter (files, files.end ()), [&](const FileWithDetails& entry) -> bool {
2180
2180
return filtermatcher.match (entry.path ());
2181
2181
});
2182
2182
return files;
0 commit comments