Fix MSVC build.

This commit is contained in:
Jacob Dufault 2017-12-18 16:35:43 -08:00
parent cb098cbfc3
commit 1fd50b4dea

View File

@ -19,9 +19,14 @@
#include <sparsepp/spp_memory.h> #include <sparsepp/spp_memory.h>
#endif #endif
//#define _STRINGIFY(x) #x // DEFAULT_RESOURCE_DIRECTORY is passed with quotes for non-MSVC compilers, ie,
//#define ENSURE_STRING_MACRO_ARGUMENT(x) _STRINGIFY(x) // foo vs "foo".
#if defined(_MSC_VER )
#define _STRINGIFY(x) #x
#define ENSURE_STRING_MACRO_ARGUMENT(x) _STRINGIFY(x)
#else
#define ENSURE_STRING_MACRO_ARGUMENT(x) x #define ENSURE_STRING_MACRO_ARGUMENT(x) x
#endif
// See http://stackoverflow.com/a/217605 // See http://stackoverflow.com/a/217605
void TrimStart(std::string& s) { void TrimStart(std::string& s) {