diff options
author | Seth Barberee <seth.barberee@gmail.com> | 2020-12-17 13:17:58 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-17 13:17:58 -0600 |
commit | 096de8d9b2ffd90c52e790296bfd7c5436d45ca3 (patch) | |
tree | 9c5af2e04dea05221c71946a5dfc06471f77801d /tools/scaninc/scaninc.cpp | |
parent | bc504264f1e54b3c1e482710c592e5549828bfe1 (diff) | |
parent | f90f3affeb9b0a66aa7df68f5fdecd692033faf9 (diff) |
Merge pull request #12 from SethBarberee/master
Merge work from SethBarberee/pmd-red into pret.
Diffstat (limited to 'tools/scaninc/scaninc.cpp')
-rw-r--r-- | tools/scaninc/scaninc.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/tools/scaninc/scaninc.cpp b/tools/scaninc/scaninc.cpp index b95cbd0..a3e40c5 100644 --- a/tools/scaninc/scaninc.cpp +++ b/tools/scaninc/scaninc.cpp @@ -97,19 +97,26 @@ int main(int argc, char **argv) } for (auto include : file.GetIncludes()) { + bool exists = false; + std::string path(""); for (auto includeDir : includeDirs) { - std::string path(includeDir + include); + path = includeDir + include; if (CanOpenFile(path)) { - bool inserted = dependencies.insert(path).second; - if (inserted) - { - filesToProcess.push(path); - } + exists = true; break; } } + if (!exists && file.FileType() == SourceFileType::Asm) + { + path = include; + } + bool inserted = dependencies.insert(path).second; + if (inserted && exists) + { + filesToProcess.push(path); + } } includeDirs.pop_back(); } |