(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

This commit is contained in:
rubidium
2014-04-23 20:13:33 +00:00
parent 287ecd1582
commit 0463dbdc9e
402 changed files with 873 additions and 1 deletions

View File

@@ -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",

View File

@@ -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;

View File

@@ -40,11 +40,12 @@
#include "../game/game_info.hpp"
#include "../game/game_instance.hpp"
#include "table/strings.h"
#include <vector>
#include "../safeguards.h"
static ScriptConfig *GetConfig(CompanyID slot)
{
if (slot == OWNER_DEITY) return GameConfig::GetConfig();

View File

@@ -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.

View File

@@ -82,6 +82,8 @@
#include "../company_base.h"
#include "../company_func.h"
#include "../safeguards.h"
AIInstance::AIInstance() :
ScriptInstance("AI")
{}

View File

@@ -18,6 +18,8 @@
#include "ai_info.hpp"
#include "ai_scanner.hpp"
#include "../safeguards.h"
AIScannerInfo::AIScannerInfo() :
ScriptScanner(),