From fe15f31f3e415c2a427bc43bce8bedf4558e6f97 Mon Sep 17 00:00:00 2001 From: scrawl Date: Sun, 10 May 2015 00:36:04 +0200 Subject: [PATCH] Remove strings.h wrapper --- CMakeLists.txt | 2 +- apps/bsatool/bsatool.cpp | 1 + components/bsa/bsa_file.hpp | 5 ++--- components/vfs/registerarchives.cpp | 3 +++ libs/platform/strings.h | 18 ------------------ 5 files changed, 7 insertions(+), 22 deletions(-) delete mode 100644 libs/platform/strings.h diff --git a/CMakeLists.txt b/CMakeLists.txt index 2fa9cb821..fae7ff683 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -194,7 +194,7 @@ find_package(SDL2 REQUIRED) find_package(OpenAL REQUIRED) find_package(Bullet REQUIRED) -include_directories("." ${LIBS_DIR} +include_directories("." SYSTEM ${OGRE_INCLUDE_DIR} ${OGRE_INCLUDE_DIR}/Ogre ${OGRE_INCLUDE_DIR}/OGRE ${OGRE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIR} diff --git a/apps/bsatool/bsatool.cpp b/apps/bsatool/bsatool.cpp index 2ea736db7..7f305052b 100644 --- a/apps/bsatool/bsatool.cpp +++ b/apps/bsatool/bsatool.cpp @@ -1,4 +1,5 @@ #include +#include #include #include diff --git a/components/bsa/bsa_file.hpp b/components/bsa/bsa_file.hpp index 8a7576f92..8ed63f35d 100644 --- a/components/bsa/bsa_file.hpp +++ b/components/bsa/bsa_file.hpp @@ -25,12 +25,11 @@ #define BSA_BSA_FILE_H #include -#include #include #include #include -#include +#include #include @@ -74,7 +73,7 @@ private: struct iltstr { bool operator()(const char *s1, const char *s2) const - { return strcasecmp(s1,s2) < 0; } + { return Misc::StringUtils::ciLess(s1, s2); } }; /** A map used for fast file name lookup. The value is the index into diff --git a/components/vfs/registerarchives.cpp b/components/vfs/registerarchives.cpp index 69d4498bb..aeda3191d 100644 --- a/components/vfs/registerarchives.cpp +++ b/components/vfs/registerarchives.cpp @@ -1,5 +1,8 @@ #include "registerarchives.hpp" +#include +#include + #include #include #include diff --git a/libs/platform/strings.h b/libs/platform/strings.h deleted file mode 100644 index c0fbb1a1b..000000000 --- a/libs/platform/strings.h +++ /dev/null @@ -1,18 +0,0 @@ -// Wrapper for MSVC/GCC -#ifndef _STRINGS_WRAPPER_H -#define _STRINGS_WRAPPER_H - - -// For GCC, just use strings.h (this applies to mingw too) -#if defined(__GNUC__) -# include -#elif defined(MSVC) || defined(_MSC_VER) -# pragma warning(disable: 4996) -# define strcasecmp stricmp -# define snprintf _snprintf -#else -# warning "Unable to determine your compiler, you should probably take a look here." -# include // Just take a guess -#endif - -#endif /* _STRINGS_WRAPPER_H */