1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-17 11:59:28 +00:00

More compile fixes for gcc 2.95

This commit is contained in:
fgenesis 2012-09-23 05:30:47 +02:00
commit 31930051d5
5 changed files with 96 additions and 55 deletions

View file

@ -359,6 +359,7 @@ static void scriptError(lua_State *L, const std::string& msg)
// memory location, be sure this is the case before running into undefined behavior later.
// - The C++ standard allows offsetof() only on POD-types. Oh well, it probably works anyways.
// If it does not compile for some reason, comment it out, hope for the best, and go ahead.
#if !(defined(__GNUC__) && __GNUC__ <= 2)
void compile_time_assertions()
{
#define oo(cls) offsetof(cls, _objtype)
@ -377,6 +378,7 @@ void compile_time_assertions()
compile_assert(oo(Path) == oo(BaseText));
#undef oo
}
#endif
template <typename T>
static void ensureType(lua_State *L, T *& ptr, ScriptObjectType ty)