summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Huderle <huderlem@gmail.com>2019-03-07 09:46:14 -0600
committerMarcus Huderle <huderlem@gmail.com>2019-03-07 09:46:14 -0600
commitbd157b301dea3526a4c373737dc8167d9a02b168 (patch)
treed8b055e8e9fab27a2e10a1fd5f48c5bfa4f0a0a9
parent6638ebe7fdda1119d8fe0056c8cf0c65cf292c11 (diff)
Scaninc: Don't insert missing headers into dependencies
-rwxr-xr-xsrc/field_message_box.c2
-rwxr-xr-xsrc/item_menu.c2
-rw-r--r--src/main_menu.c2
-rw-r--r--tools/scaninc/scaninc.cpp14
4 files changed, 3 insertions, 17 deletions
diff --git a/src/field_message_box.c b/src/field_message_box.c
index ca1c05e22..ac5e7a4bb 100755
--- a/src/field_message_box.c
+++ b/src/field_message_box.c
@@ -1,6 +1,6 @@
-#include <string.h>
#include "global.h"
#include "menu.h"
+#include "string.h"
#include "string_util.h"
#include "task.h"
#include "text.h"
diff --git a/src/item_menu.c b/src/item_menu.c
index 5d5dfe854..5b9946e62 100755
--- a/src/item_menu.c
+++ b/src/item_menu.c
@@ -1,4 +1,3 @@
-#include <string.h>
#include "global.h"
#include "item_menu.h"
#include "battle.h"
@@ -41,6 +40,7 @@
#include "shop.h"
#include "sound.h"
#include "sprite.h"
+#include "string.h"
#include "strings.h"
#include "string_util.h"
#include "task.h"
diff --git a/src/main_menu.c b/src/main_menu.c
index 1879495f5..e6e29d942 100644
--- a/src/main_menu.c
+++ b/src/main_menu.c
@@ -1,4 +1,3 @@
-#include <string.h>
#include "global.h"
#include "trainer_pokemon_sprites.h"
#include "bg.h"
@@ -31,6 +30,7 @@
#include "scanline_effect.h"
#include "sound.h"
#include "sprite.h"
+#include "string.h"
#include "strings.h"
#include "string_util.h"
#include "task.h"
diff --git a/tools/scaninc/scaninc.cpp b/tools/scaninc/scaninc.cpp
index 696842dc9..b95cbd033 100644
--- a/tools/scaninc/scaninc.cpp
+++ b/tools/scaninc/scaninc.cpp
@@ -97,7 +97,6 @@ int main(int argc, char **argv)
}
for (auto include : file.GetIncludes())
{
- bool found = false;
for (auto includeDir : includeDirs)
{
std::string path(includeDir + include);
@@ -108,22 +107,9 @@ int main(int argc, char **argv)
{
filesToProcess.push(path);
}
- found = true;
break;
}
}
- if (!found)
- {
- if (GetFileType(include) == SourceFileType::Header)
- // We don't have any generated .h files... yet.
- // Better to give a warning; debugging the makefile when a
- // header is missing is very difficult.
- fprintf(stderr, "scaninc: warning: C header file \"%s\" not found. (included from \"%s\")\n",
- include.c_str(), filePath.c_str());
-
- // It's probably a generated file.
- dependencies.insert(include);
- }
}
includeDirs.pop_back();
}