From 0463dbdc9e5b39399765015c394e29dedaf7d041 Mon Sep 17 00:00:00 2001 From: rubidium Date: Wed, 23 Apr 2014 20:13:33 +0000 Subject: (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values --- src/ai/ai_config.cpp | 2 ++ src/ai/ai_core.cpp | 2 ++ src/ai/ai_gui.cpp | 3 ++- src/ai/ai_info.cpp | 2 ++ src/ai/ai_instance.cpp | 2 ++ src/ai/ai_scanner.cpp | 2 ++ 6 files changed, 12 insertions(+), 1 deletion(-) (limited to 'src/ai') diff --git a/src/ai/ai_config.cpp b/src/ai/ai_config.cpp index 3b3c09a42..65365f4d4 100644 --- a/src/ai/ai_config.cpp +++ b/src/ai/ai_config.cpp @@ -15,6 +15,8 @@ #include "ai_config.hpp" #include "ai_info.hpp" +#include "../safeguards.h" + /** Configuration for AI start date, every AI has this setting. */ ScriptConfigItem _start_date_config = { "start_date", diff --git a/src/ai/ai_core.cpp b/src/ai/ai_core.cpp index 3f4381b0c..d4ff23311 100644 --- a/src/ai/ai_core.cpp +++ b/src/ai/ai_core.cpp @@ -22,6 +22,8 @@ #include "ai_info.hpp" #include "ai.hpp" +#include "../safeguards.h" + /* static */ uint AI::frame_counter = 0; /* static */ AIScannerInfo *AI::scanner_info = NULL; /* static */ AIScannerLibrary *AI::scanner_library = NULL; diff --git a/src/ai/ai_gui.cpp b/src/ai/ai_gui.cpp index 8bcc41455..885c9bee8 100644 --- a/src/ai/ai_gui.cpp +++ b/src/ai/ai_gui.cpp @@ -40,11 +40,12 @@ #include "../game/game_info.hpp" #include "../game/game_instance.hpp" - #include "table/strings.h" #include +#include "../safeguards.h" + static ScriptConfig *GetConfig(CompanyID slot) { if (slot == OWNER_DEITY) return GameConfig::GetConfig(); diff --git a/src/ai/ai_info.cpp b/src/ai/ai_info.cpp index 375248d7d..9c9f3b47e 100644 --- a/src/ai/ai_info.cpp +++ b/src/ai/ai_info.cpp @@ -17,6 +17,8 @@ #include "../debug.h" #include "../rev.h" +#include "../safeguards.h" + /** * Check if the API version provided by the AI is supported. * @param api_version The API version as provided by the AI. diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp index f109a0926..1c304c856 100644 --- a/src/ai/ai_instance.cpp +++ b/src/ai/ai_instance.cpp @@ -82,6 +82,8 @@ #include "../company_base.h" #include "../company_func.h" +#include "../safeguards.h" + AIInstance::AIInstance() : ScriptInstance("AI") {} diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp index 64b877c6c..7c2bff778 100644 --- a/src/ai/ai_scanner.cpp +++ b/src/ai/ai_scanner.cpp @@ -18,6 +18,8 @@ #include "ai_info.hpp" #include "ai_scanner.hpp" +#include "../safeguards.h" + AIScannerInfo::AIScannerInfo() : ScriptScanner(), -- cgit v1.2.3-70-g09d2