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/core/alloc_func.cpp | 2 ++ src/core/bitmath_func.cpp | 2 ++ src/core/geometry_func.cpp | 2 ++ src/core/math_func.cpp | 2 ++ src/core/pool_func.cpp | 2 ++ src/core/random_func.cpp | 2 ++ 6 files changed, 12 insertions(+) (limited to 'src/core') diff --git a/src/core/alloc_func.cpp b/src/core/alloc_func.cpp index d2b3a4b6c..b78023f4d 100644 --- a/src/core/alloc_func.cpp +++ b/src/core/alloc_func.cpp @@ -11,6 +11,8 @@ #include "../stdafx.h" +#include "../safeguards.h" + /** * Function to exit with an error message after malloc() or calloc() have failed * @param size number of bytes we tried to allocate diff --git a/src/core/bitmath_func.cpp b/src/core/bitmath_func.cpp index af0200bcb..776322731 100644 --- a/src/core/bitmath_func.cpp +++ b/src/core/bitmath_func.cpp @@ -12,6 +12,8 @@ #include "../stdafx.h" #include "bitmath_func.hpp" +#include "../safeguards.h" + const uint8 _ffb_64[64] = { 0, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, diff --git a/src/core/geometry_func.cpp b/src/core/geometry_func.cpp index 1a1588738..86f317a37 100644 --- a/src/core/geometry_func.cpp +++ b/src/core/geometry_func.cpp @@ -13,6 +13,8 @@ #include "geometry_func.hpp" #include "math_func.hpp" +#include "../safeguards.h" + /** * Compute bounding box of both dimensions. * @param d1 First dimension. diff --git a/src/core/math_func.cpp b/src/core/math_func.cpp index 8c136c0bb..d92770208 100644 --- a/src/core/math_func.cpp +++ b/src/core/math_func.cpp @@ -12,6 +12,8 @@ #include "../stdafx.h" #include "math_func.hpp" +#include "../safeguards.h" + /** * Compute least common multiple (lcm) of arguments \a a and \a b, the smallest * integer value that is a multiple of both \a a and \a b. diff --git a/src/core/pool_func.cpp b/src/core/pool_func.cpp index fa410850f..f8ff93cec 100644 --- a/src/core/pool_func.cpp +++ b/src/core/pool_func.cpp @@ -12,6 +12,8 @@ #include "../stdafx.h" #include "pool_type.hpp" +#include "../safeguards.h" + /** * Destructor removes this object from the pool vector and * deletes the vector itself if this was the last item removed. diff --git a/src/core/random_func.cpp b/src/core/random_func.cpp index 8cf21b54f..5c1d07940 100644 --- a/src/core/random_func.cpp +++ b/src/core/random_func.cpp @@ -13,6 +13,8 @@ #include "random_func.hpp" #include "bitmath_func.hpp" +#include "../safeguards.h" + Randomizer _random, _interactive_random; /** -- cgit v1.2.3-54-g00ecf