Skip to content

Commit 0b7af0d

Browse files
committed
Fix overrides in cffi
1 parent 86fbe41 commit 0b7af0d

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

include/hx/CFFILoader.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ extern "C" ret name def_args;
127127
struct DynAlloc : public hx::IStringAlloc
128128
{
129129
#define WANT_DYNALLOC_ALLOC_BYTES
130-
void *allocBytes(size_t n);
130+
void *allocBytes(size_t n) HXCPP_OVERRIDE;
131131
};
132132

133133

include/hx/StringAlloc.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,14 @@ class IStringAlloc
1616
~IStringAlloc(){};
1717
};
1818

19+
#ifndef HXCPP_OVERRIDE
20+
#if __cplusplus >= 201103L || (defined(_MSC_VER) && _MSVC_LANG >= 201103L)
21+
#define HXCPP_OVERRIDE override
22+
#else
23+
#define HXCPP_OVERRIDE
24+
#endif
25+
#endif
26+
1927
template<int STACK>
2028
class StringAlloc : public IStringAlloc
2129
{

0 commit comments

Comments
 (0)