Skip to content

Commit db5c880

Browse files
committed
Some fixes to make idaclang a little bit happier
1 parent e164e38 commit db5c880

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

include/eqlib/Offsets.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,15 @@ uintptr_t FixEQMainOffset(T nOffset)
104104
// FUNCTION_AT_ADDRESS macros
105105
//
106106

107-
#if defined(_M_AMD64)
107+
#if defined(__clang__)
108+
109+
#define FUNCTION_AT_ADDRESS(rettype, func, variable)
110+
#define FUNCTION_AT_VIRTUAL_ADDRESS(rettype, func, offset)
111+
#define FORWARD_FUNCTION_TO_VTABLE(rettype, function, Class, member)
112+
#define FORWARD_FUNCTION_TO_VTABLE2(a, b, c, d, e)
113+
#define FUNCTION_AT_VIRTUAL_TABLE_ADDRESS(rettype, function, address, offset)
114+
115+
#elif defined(_M_AMD64)
108116

109117
#define FUNCTION_AT_ADDRESS(rettype, func, variable) \
110118
FUNCTION_CHECKS_OFF() \

include/eqlib/WindowOverride.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,9 @@ class CXWndTrampoline : public Target
134134
virtual void UpdateLayout(bool finish = false) override;
135135
};
136136

137+
#ifdef __clang__
138+
#define IMPLEMENT_VTABLE_TRAMPOLINE(Orig, Class, RetType, Name, Signature)
139+
#else
137140
#define IMPLEMENT_VTABLE_TRAMPOLINE(Orig, Class, RetType, Name, Signature) \
138141
template <typename Target> \
139142
__declspec(naked) RetType Class<Target>::Name Signature { \
@@ -142,6 +145,7 @@ class CXWndTrampoline : public Target
142145
__asm mov eax, [TargetT::s_originalVTable] \
143146
__asm jmp dword ptr [eax]VFT.Name \
144147
}
148+
#endif
145149

146150
IMPLEMENT_VTABLE_TRAMPOLINE(CXWnd, CXWndTrampoline, bool, IsValid, () const);
147151
IMPLEMENT_VTABLE_TRAMPOLINE(CXWnd, CXWndTrampoline, int, DrawNC, () const);

src/EQLibStatic.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@
2020

2121
#include "game/CXStr.cpp"
2222
#include "game/CXWnd.cpp"
23+
#include "game/Display.cpp"
2324
#include "game/EQClasses.cpp"
2425
#include "game/EverQuest.cpp"
2526
#include "game/FunctionDefs.cpp"
2627
#include "game/Globals.cpp"
27-
#include "game/GraphicsEngine.cpp"
2828
#include "game/ItemLinks.cpp"
2929
#include "game/Items.cpp"
3030
#include "game/PcClient.cpp"
@@ -36,3 +36,4 @@
3636
#include "game/UITemplates.cpp"
3737
#include "game/UITextures.cpp"
3838
#include "game/XMLData.cpp"
39+
#include "graphics/GraphicsEngine.cpp"

0 commit comments

Comments
 (0)