summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_accounting.hpp.sq
diff options
context:
space:
mode:
authortruebrain <truebrain@openttd.org>2011-11-19 15:41:29 +0000
committertruebrain <truebrain@openttd.org>2011-11-19 15:41:29 +0000
commitdbd66cf523a1707c6ac2db2d49fda8e5201d91b5 (patch)
treeaea76a26fc5da036f70af40bc94da4249b1283a3 /src/ai/api/ai_accounting.hpp.sq
parent6afcc85be45633548626269cd304b7951e51956c (diff)
downloadopenttd-dbd66cf523a1707c6ac2db2d49fda8e5201d91b5.tar.xz
(svn r23261) -Codechange: Squirrel glue templates were not inline (tnx to michi_cc)
Diffstat (limited to 'src/ai/api/ai_accounting.hpp.sq')
-rw-r--r--src/ai/api/ai_accounting.hpp.sq10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ai/api/ai_accounting.hpp.sq b/src/ai/api/ai_accounting.hpp.sq
index 1b71acf07..182561e9b 100644
--- a/src/ai/api/ai_accounting.hpp.sq
+++ b/src/ai/api/ai_accounting.hpp.sq
@@ -13,11 +13,11 @@
namespace SQConvert {
/* Allow AIAccounting to be used as Squirrel parameter */
- template <> AIAccounting *GetParam(ForceType<AIAccounting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIAccounting *)instance; }
- template <> AIAccounting &GetParam(ForceType<AIAccounting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIAccounting *)instance; }
- template <> const AIAccounting *GetParam(ForceType<const AIAccounting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIAccounting *)instance; }
- template <> const AIAccounting &GetParam(ForceType<const AIAccounting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIAccounting *)instance; }
- template <> int Return<AIAccounting *>(HSQUIRRELVM vm, AIAccounting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIAccounting", res, NULL, DefSQDestructorCallback<AIAccounting>); return 1; }
+ template <> inline AIAccounting *GetParam(ForceType<AIAccounting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIAccounting *)instance; }
+ template <> inline AIAccounting &GetParam(ForceType<AIAccounting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIAccounting *)instance; }
+ template <> inline const AIAccounting *GetParam(ForceType<const AIAccounting *>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return (AIAccounting *)instance; }
+ template <> inline const AIAccounting &GetParam(ForceType<const AIAccounting &>, HSQUIRRELVM vm, int index, SQAutoFreePointers *ptr) { SQUserPointer instance; sq_getinstanceup(vm, index, &instance, 0); return *(AIAccounting *)instance; }
+ template <> inline int Return<AIAccounting *>(HSQUIRRELVM vm, AIAccounting *res) { if (res == NULL) { sq_pushnull(vm); return 1; } res->AddRef(); Squirrel::CreateClassInstanceVM(vm, "AIAccounting", res, NULL, DefSQDestructorCallback<AIAccounting>); return 1; }
} // namespace SQConvert
template <> const char *GetClassName<AIAccounting>() { return "AIAccounting"; }