diff options
author | shinny <shinny456@users.noreply.github.com> | 2020-06-02 14:51:57 -0400 |
---|---|---|
committer | shinny <shinny456@users.noreply.github.com> | 2020-06-02 14:51:57 -0400 |
commit | 4f88655a79bb2d8f10bdce2841f427c0e27040bd (patch) | |
tree | b750e64b62cec61ca3a43da6aa7d4e3b37e64c9e /tools/scaninc/scaninc.cpp | |
parent | bc504264f1e54b3c1e482710c592e5549828bfe1 (diff) |
update tools
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(); } |