VC12 fixes by @dalkon

This commit is contained in:
Sam
2013-12-15 19:08:51 +01:00
parent 22f97aa00b
commit 863bece70b
6 changed files with 109 additions and 8 deletions

View File

@@ -75,7 +75,7 @@ void Stacktrace(LPEXCEPTION_POINTERS e, std::stringstream& ss)
pSym = (PIMAGEHLP_SYMBOL)symBuffer;
ZeroMemory(&sf, sizeof(sf));
#ifdef __WIN64__
#ifdef _WIN64
sf.AddrPC.Offset = e->ContextRecord->Rip;
sf.AddrStack.Offset = e->ContextRecord->Rsp;
sf.AddrFrame.Offset = e->ContextRecord->Rbp;

View File

@@ -40,6 +40,7 @@
#error "You need Visual Studio 2013 or greater to compile."
#endif
#pragma warning(disable:4244) // conversion from 'A' to 'B', possible loss of data
#pragma warning(disable:4267) // '?' : conversion from 'A' to 'B', possible loss of data
#pragma warning(disable:4305) // 'initializing' : truncation from 'A' to 'B'
#pragma warning(disable:4146) // unary minus operator applied to unsigned type, result still unsigned
#pragma warning(disable:4800) // 'A' : forcing value to bool 'true' or 'false' (performance warning)

View File

@@ -23,6 +23,10 @@
#include "math.h"
#include <random>
#ifdef _MSC_VER
#pragma warning(disable:4267) // '?' : conversion from 'A' to 'B', possible loss of data
#endif
namespace stdext {
uint32_t adler32(const uint8_t *buffer, size_t size) {

View File

@@ -26,6 +26,10 @@
#include <ctype.h>
#include <physfs.h>
#ifdef _MSC_VER
#pragma warning(disable:4267) // '?' : conversion from 'A' to 'B', possible loss of data
#endif
namespace stdext {
std::string resolve_path(const std::string& filePath, std::string sourcePath)