Cleaned up lua glue macro a bit

This commit is contained in:
KimLS
2013-05-13 14:40:15 -07:00
parent 7b23c8dc75
commit 20fc585b5e
6 changed files with 350 additions and 346 deletions
+4 -3
View File
@@ -8,14 +8,15 @@ class Client;
class Lua_Client : public Lua_Mob
{
typedef Client NativeType;
public:
Lua_Client() { d_ = nullptr; }
Lua_Client(Client *d) { d_ = d; }
Lua_Client(NativeType *d) { d_ = d; }
virtual ~Lua_Client() { }
operator Client* () {
operator NativeType* () {
if(d_) {
return reinterpret_cast<Client*>(d_);
return reinterpret_cast<NativeType*>(d_);
}
return nullptr;