From: RĂ©mi Verschelde Date: Sat, 3 Dec 2016 20:51:13 +0000 (+0100) Subject: Rename DATADIR to DATA_DIR to avoid conflict X-Git-Url: https://git.jsancho.org/?a=commitdiff_plain;h=38f5e6366de921c4d127c9f8e3e0113cc33ac595;p=lugaru.git Rename DATADIR to DATA_DIR to avoid conflict On MinGW it would error out with: Source/Utils/Folders.cpp:33:45: error: expected primary-expression before ';' token const std::string Folders::dataDir = DATADIR; ^ The issue seems to be that MinGW (and likely MSVC) is case insensitive and would see DATADIR as conflicting with dataDir. --- diff --git a/Source/Utils/Folders.cpp b/Source/Utils/Folders.cpp index e845b3f..33d3b15 100644 --- a/Source/Utils/Folders.cpp +++ b/Source/Utils/Folders.cpp @@ -27,11 +27,10 @@ along with Lugaru. If not, see . #include #endif #if _WIN32 -#include -#include +#include #endif -const std::string Folders::dataDir = DATADIR; +const std::string Folders::dataDir = DATA_DIR; std::string Folders::getScreenshotDir() { diff --git a/Source/Utils/Folders.h b/Source/Utils/Folders.h index 9ed7ae4..d511ac2 100644 --- a/Source/Utils/Folders.h +++ b/Source/Utils/Folders.h @@ -23,8 +23,8 @@ along with Lugaru. If not, see . #include -#ifndef DATADIR -#define DATADIR "Data" +#ifndef DATA_DIR +#define DATA_DIR "Data" #endif class Folders