summaryrefslogtreecommitdiff
path: root/tools/scaninc/scaninc.cpp
diff options
context:
space:
mode:
authorDiegoisawesome <diego@domoreaweso.me>2019-09-04 13:18:49 -0700
committerDiegoisawesome <diego@domoreaweso.me>2019-09-04 13:18:49 -0700
commita7ef6c4cbf5ef481281917685a633ccd842335d5 (patch)
tree44674b0580f41426eb5112e31cdc0245237d1666 /tools/scaninc/scaninc.cpp
parent1ec2c86089fd933a46ef405da63c131aee52d7e0 (diff)
Update tool sources and binaries from pokeemeraldHEADmaster
Diffstat (limited to 'tools/scaninc/scaninc.cpp')
-rw-r--r--tools/scaninc/scaninc.cpp19
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();
}