Skip to content

Commit e0bb151

Browse files
committed
fix ci
1 parent 71c5661 commit e0bb151

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

‎cli/filelister.cpp‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
// When compiling Unicode targets WinAPI automatically uses *W Unicode versions
4747
// of called functions. Thus, we explicitly call *A versions of the functions.
4848

49-
static std::string addFiles2(std::list<FileWithDetails>&files, const std::string &path, const std::set<std::string> &extra, bool recursive, const PathMatch& ignored, bool debug = false)
49+
static std::string addFiles2(std::list<FileWithDetails>&files, const std::string &path, const std::set<std::string> &extra, bool recursive, PathMatch& ignored, bool debug = false)
5050
{
5151
const std::string cleanedPath = Path::toNativeSeparators(path);
5252

@@ -163,7 +163,7 @@ static std::string addFiles2(std::list<FileWithDetails>&files, const std::string
163163
return "";
164164
}
165165

166-
std::string FileLister::addFiles(std::list<FileWithDetails> &files, const std::string &path, const std::set<std::string> &extra, bool recursive, const PathMatch& ignored, bool debug)
166+
std::string FileLister::addFiles(std::list<FileWithDetails> &files, const std::string &path, const std::set<std::string> &extra, bool recursive, PathMatch& ignored, bool debug)
167167
{
168168
if (path.empty())
169169
return "no path specified";

‎lib/pathmatch.cpp‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "path.h"
2222

2323
#include <algorithm>
24+
#include <iterator>
2425
#include <stack>
2526
#include <string>
2627
#include <utility>
@@ -155,9 +156,8 @@ bool PathMatch::match(const std::string &pattern, const std::string &path, const
155156

156157
std::vector<std::string> PathMatch::unmatched() const {
157158
std::vector<std::string> ret;
158-
for (const std::string& s: mPatterns) {
159-
if (mMatchedPatterns.count(s) == 0)
160-
ret.push_back(s);
161-
}
159+
std::copy_if(mPatterns.cbegin(), mPatterns.cend(), std::back_inserter(ret), [this](const std::string& s) {
160+
return mMatchedPatterns.count(s) == 0;
161+
});
162162
return ret;
163163
}

‎lib/pathmatch.h‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
#include <cctype>
2525
#include <cstdint>
2626
#include <cstdio>
27+
#include <set>
2728
#include <string>
2829
#include <vector>
2930

0 commit comments

Comments
 (0)