mirror of https://github.com/OpenTTD/OpenTTD
(svn r17006) -Fix (r17005): gcc compile failure
parent
c2ed884012
commit
3c06534286
|
@ -13,9 +13,7 @@
|
||||||
class AIMap : public AIObject {
|
class AIMap : public AIObject {
|
||||||
public:
|
public:
|
||||||
#ifdef DEFINE_SCRIPT_FILES
|
#ifdef DEFINE_SCRIPT_FILES
|
||||||
enum MapType {
|
static const int TILE_INVALID = INVALID_TILE; //!< Invalid TileIndex.
|
||||||
TILE_INVALID = INVALID_TILE, //!< Invalid TileIndex.
|
|
||||||
};
|
|
||||||
#endif /* DEFINE_SCRIPT_FILES */
|
#endif /* DEFINE_SCRIPT_FILES */
|
||||||
#ifdef DOXYGEN_SKIP
|
#ifdef DOXYGEN_SKIP
|
||||||
const static TileIndex TILE_INVALID; //!< Invalid TileIndex.
|
const static TileIndex TILE_INVALID; //!< Invalid TileIndex.
|
||||||
|
|
|
@ -4,10 +4,6 @@
|
||||||
#include "ai_map.hpp"
|
#include "ai_map.hpp"
|
||||||
|
|
||||||
namespace SQConvert {
|
namespace SQConvert {
|
||||||
/* Allow enums to be used as Squirrel parameters */
|
|
||||||
template <> AIMap::MapType GetParam(ForceType<AIMap::MapType>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQInteger tmp; sq_getinteger(vm, index, &tmp); return (AIMap::MapType)tmp; }
|
|
||||||
template <> int Return<AIMap::MapType>(HSQUIRRELVM vm, AIMap::MapType res) { sq_pushinteger(vm, (int32)res); return 1; }
|
|
||||||
|
|
||||||
/* Allow AIMap to be used as Squirrel parameter */
|
/* Allow AIMap to be used as Squirrel parameter */
|
||||||
template <> AIMap *GetParam(ForceType<AIMap *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIMap *)instance; }
|
template <> AIMap *GetParam(ForceType<AIMap *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIMap *)instance; }
|
||||||
template <> AIMap &GetParam(ForceType<AIMap &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIMap *)instance; }
|
template <> AIMap &GetParam(ForceType<AIMap &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIMap *)instance; }
|
||||||
|
|
|
@ -333,7 +333,7 @@ BEGIN {
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add a const (non-enum) value
|
# Add a const (non-enum) value
|
||||||
/^[ ]*static const \w+ \w+ = \w+;$/ {
|
/^[ ]*static const \w+ \w+ = \w+;/ {
|
||||||
const_size++
|
const_size++
|
||||||
const_value[const_size] = $4
|
const_value[const_size] = $4
|
||||||
next
|
next
|
||||||
|
|
Loading…
Reference in New Issue