]> git.jsancho.org Git - lugaru.git/commitdiff
Rename DATADIR to DATA_DIR to avoid conflict
authorRémi Verschelde <rverschelde@gmail.com>
Sat, 3 Dec 2016 20:51:13 +0000 (21:51 +0100)
committerRémi Verschelde <rverschelde@gmail.com>
Sat, 3 Dec 2016 20:51:13 +0000 (21:51 +0100)
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.

Source/Utils/Folders.cpp
Source/Utils/Folders.h

index e845b3f3e0995f700d92ff57a5b0d083828368b9..33d3b15cfdc6c8e8f85e02c1ab81137bb7c86bb7 100644 (file)
@@ -27,11 +27,10 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 #include <pwd.h>
 #endif
 #if _WIN32
-#include <Windows.h>
-#include <WinBase.h>
+#include <windows.h>
 #endif
 
-const std::string Folders::dataDir = DATADIR;
+const std::string Folders::dataDir = DATA_DIR;
 
 std::string Folders::getScreenshotDir()
 {
index 9ed7ae447739c4d1b597e364acb38bd93d0961c9..d511ac221c5d7d3261b33940a41f0ae7c1154809 100644 (file)
@@ -23,8 +23,8 @@ along with Lugaru.  If not, see <http://www.gnu.org/licenses/>.
 
 #include <string>
 
-#ifndef DATADIR
-#define DATADIR "Data"
+#ifndef DATA_DIR
+#define DATA_DIR "Data"
 #endif
 
 class Folders