From 126d8bc7f51745dff5d2c2909d5b80715ce1e308 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Skutnik Date: Fri, 29 Jan 2021 23:26:16 -0800 Subject: [PATCH] Merged compat.h and helper.h --- src/compat.h | 11 ----------- src/helper.h | 12 ++++++++++++ src/png.h | 2 +- src/worldloader.h | 1 - 4 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 src/compat.h diff --git a/src/compat.h b/src/compat.h deleted file mode 100644 index 64cbd538..00000000 --- a/src/compat.h +++ /dev/null @@ -1,11 +0,0 @@ -#if defined(_OPENMP) && defined(_WINDOWS) -#define OMP_FOR_INDEX int -#else -#define OMP_FOR_INDEX std::vector::size_type -#endif - -#ifdef _WINDOWS -#define FSEEK fseek -#else -#define FSEEK fseeko -#endif diff --git a/src/helper.h b/src/helper.h index aa981898..bd9fce0a 100644 --- a/src/helper.h +++ b/src/helper.h @@ -11,6 +11,18 @@ namespace fs = std::filesystem; #define NOINLINE #endif +#if defined(_OPENMP) && defined(_WINDOWS) +#define OMP_FOR_INDEX int +#else +#define OMP_FOR_INDEX std::vector::size_type +#endif + +#ifdef _WINDOWS +#define FSEEK fseek +#else +#define FSEEK fseeko +#endif + #define CHUNKSIZE 16 #define REGIONSIZE 32 #define MIN_TERRAIN_HEIGHT 0 diff --git a/src/png.h b/src/png.h index fc7ca3fc..716af0dd 100644 --- a/src/png.h +++ b/src/png.h @@ -1,7 +1,7 @@ #ifndef DRAW_PNG_H_ #define DRAW_PNG_H_ -#include "./compat.h" +#include "./helper.h" #include #include #include diff --git a/src/worldloader.h b/src/worldloader.h index 9470e5c2..60552eb9 100644 --- a/src/worldloader.h +++ b/src/worldloader.h @@ -2,7 +2,6 @@ #define WORLDLOADER_H_ #include "./colors.h" -#include "./compat.h" #include "./helper.h" #include #include