| 99 | } |
| 100 | |
| 101 | bool next(const FileWithDetails *&file, const FileSettings *&fs, std::size_t &fileSize) { |
| 102 | std::lock_guard<std::mutex> l(mFileSync); |
| 103 | if (mItNextFile != mFiles.end()) { |
| 104 | file = &(*mItNextFile); |
| 105 | fs = nullptr; |
| 106 | fileSize = mItNextFile->size(); |
| 107 | ++mItNextFile; |
| 108 | return true; |
| 109 | } |
| 110 | if (mItNextFileSettings != mFileSettings.end()) { |
| 111 | file = nullptr; |
| 112 | fs = &(*mItNextFileSettings); |
| 113 | fileSize = 0; |
| 114 | ++mItNextFileSettings; |
| 115 | return true; |
| 116 | } |
| 117 | |
| 118 | return false; |
| 119 | } |
| 120 | |
| 121 | unsigned int check(const FileWithDetails *file, const FileSettings *fs) { |
| 122 | CppCheck fileChecker(mSettings, mSuppressions, mLogForwarder, mTimerResults, false, mExecuteCommand); |