mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r22481) -Fix: compilation with recent GCC
This commit is contained in:
parent
9b54356d3c
commit
2447efdefd
|
@ -137,7 +137,4 @@ extern SQObjectPtr _minusone_;
|
||||||
|
|
||||||
bool CompileTypemask(SQIntVec &res,const SQChar *typemask);
|
bool CompileTypemask(SQIntVec &res,const SQChar *typemask);
|
||||||
|
|
||||||
void *sq_vm_malloc(SQUnsignedInteger size);
|
|
||||||
void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
|
|
||||||
void sq_vm_free(void *p,SQUnsignedInteger size);
|
|
||||||
#endif //_SQSTATE_H_
|
#endif //_SQSTATE_H_
|
||||||
|
|
|
@ -2,6 +2,10 @@
|
||||||
#ifndef _SQUTILS_H_
|
#ifndef _SQUTILS_H_
|
||||||
#define _SQUTILS_H_
|
#define _SQUTILS_H_
|
||||||
|
|
||||||
|
void *sq_vm_malloc(SQUnsignedInteger size);
|
||||||
|
void *sq_vm_realloc(void *p,SQUnsignedInteger oldsize,SQUnsignedInteger size);
|
||||||
|
void sq_vm_free(void *p,SQUnsignedInteger size);
|
||||||
|
|
||||||
#define sq_new(__ptr,__type) {__ptr=(__type *)sq_vm_malloc(sizeof(__type));new (__ptr) __type;}
|
#define sq_new(__ptr,__type) {__ptr=(__type *)sq_vm_malloc(sizeof(__type));new (__ptr) __type;}
|
||||||
#define sq_delete(__ptr,__type) {__ptr->~__type();sq_vm_free(__ptr,sizeof(__type));}
|
#define sq_delete(__ptr,__type) {__ptr->~__type();sq_vm_free(__ptr,sizeof(__type));}
|
||||||
#define SQ_MALLOC(__size) sq_vm_malloc((__size));
|
#define SQ_MALLOC(__size) sq_vm_malloc((__size));
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#define CMD_HELPER_H
|
#define CMD_HELPER_H
|
||||||
|
|
||||||
#include "core/enum_type.hpp"
|
#include "core/enum_type.hpp"
|
||||||
|
#include "core/bitmath_func.hpp"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Extracts a given type from a value.
|
* Extracts a given type from a value.
|
||||||
|
|
Loading…
Reference in New Issue