Skip to content

Commit 6aa289c

Browse files
committed
ThreadExecutor: small ThreadData adjustment to prepare it for shared usage
1 parent c580613 commit 6aa289c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cli/threadexecutor.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ class ThreadData
113113
return false;
114114
}
115115

116-
unsigned int check(const std::string *file, const ImportProject::FileSettings *fs) {
117-
CppCheck fileChecker(logForwarder, false, CppCheckExecutor::executeCommand);
116+
unsigned int check(ErrorLogger &errorLogger, const std::string *file, const ImportProject::FileSettings *fs) {
117+
CppCheck fileChecker(errorLogger, false, CppCheckExecutor::executeCommand);
118118
fileChecker.settings() = mSettings; // this is a copy
119119

120120
unsigned int result;
@@ -151,6 +151,8 @@ class ThreadData
151151

152152
std::mutex mFileSync;
153153
const Settings &mSettings;
154+
155+
public:
154156
SyncLogForwarder logForwarder;
155157
};
156158

@@ -163,7 +165,7 @@ static unsigned int STDCALL threadProc(ThreadData *data)
163165
std::size_t fileSize;
164166

165167
while (data->next(file, fs, fileSize)) {
166-
result += data->check(file, fs);
168+
result += data->check(data->logForwarder, file, fs);
167169

168170
data->status(fileSize);
169171
}

0 commit comments

Comments
 (0)