Merge branch 'master' into develop

This commit is contained in:
athre0z 2015-05-20 18:51:35 +02:00
commit a49d70e4a7
5 changed files with 6 additions and 4 deletions

View File

@ -14,7 +14,7 @@ if (NOT CONFIGURED_ONCE)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR
"${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(compiler_specific "-Werror") set(compiler_specific "-Werror")
set(compiler_specific_cxx "-std=c++0x") set(compiler_specific_cxx "-std=c++14")
elseif (MSVC) elseif (MSVC)
set(compiler_specific "/WX /W4 /D_CRT_SECURE_NO_WARNINGS") set(compiler_specific "/WX /W4 /D_CRT_SECURE_NO_WARNINGS")
endif () endif ()

View File

@ -126,7 +126,7 @@ public:
static FullClassT* fromInstance(ZydisClassT* instance) static FullClassT* fromInstance(ZydisClassT* instance)
{ {
return reinterpret_cast<FullClassT*>( return reinterpret_cast<FullClassT*>(
reinterpret_cast<uintptr_t>(instance) - offsetof(FullClassT, instance)); reinterpret_cast<uintptr_t>(instance) - sizeof(std::declval<FullClassT>().type));
} }
}; };
#pragma pack(pop) #pragma pack(pop)

View File

@ -33,8 +33,9 @@
#define Zydis_EXPORTS #define Zydis_EXPORTS
#include <cstdbool> #include <stdbool.h>
#include <stdint.h> #include <stdint.h>
#include <stddef.h>
#include "ZydisExportConfig.h" #include "ZydisExportConfig.h"
#ifdef __cplusplus #ifdef __cplusplus

View File

@ -31,6 +31,7 @@
#ifndef _ZYDIS_SYMBOLRESOLVER_HPP_ #ifndef _ZYDIS_SYMBOLRESOLVER_HPP_
#define _ZYDIS_SYMBOLRESOLVER_HPP_ #define _ZYDIS_SYMBOLRESOLVER_HPP_
#include <string>
#include <unordered_map> #include <unordered_map>
#include "ZydisTypes.hpp" #include "ZydisTypes.hpp"