Skip to content
Snippets Groups Projects
Unverified Commit 2bd8cd04 authored by John Kessenich's avatar John Kessenich Committed by GitHub
Browse files

Merge pull request #1287 from eintw1ck/master

include/Common.h: reorder includes to avoid redefinition on some platforms
parents 845860d5 b3e80f5a
No related branches found
No related tags found
No related merge requests found
......@@ -37,9 +37,24 @@
#ifndef _COMMON_INCLUDED_
#define _COMMON_INCLUDED_
#if defined(__ANDROID__) || _MSC_VER < 1700
#include <sstream>
namespace std {
template<typename T>
std::string to_string(const T& val) {
std::ostringstream os;
os << val;
return os.str();
}
}
#endif
#if (defined(_MSC_VER) && _MSC_VER < 1900 /*vs2015*/) || defined MINGW_HAS_SECURE_API
#include <basetsd.h>
#ifndef snprintf
#define snprintf sprintf_s
#endif
#define safe_vsprintf(buf,max,format,args) vsnprintf_s((buf), (max), (max), (format), (args))
#elif defined (solaris)
#define safe_vsprintf(buf,max,format,args) vsnprintf((buf), (max), (format), (args))
......@@ -51,18 +66,6 @@
#define UINT_PTR uintptr_t
#endif
#if defined(__ANDROID__) || (defined(_MSC_VER) && _MSC_VER < 1700)
#include <sstream>
namespace std {
template<typename T>
std::string to_string(const T& val) {
std::ostringstream os;
os << val;
return os.str();
}
}
#endif
#if defined(_MSC_VER) && _MSC_VER < 1800
inline long long int strtoll (const char* str, char** endptr, int base)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment