summaryrefslogtreecommitdiff
path: root/plugins/MirLua/src/mlua_metatable.h
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-11-09 15:27:49 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-11-09 15:27:49 +0000
commitb0767875612ca56f4b5236064772b14d33bf41aa (patch)
tree52b27ea009a39dd451239723a1a28a6787a7b6bd /plugins/MirLua/src/mlua_metatable.h
parent679df74757fbd41c13e27363d1d68d74bf2af38a (diff)
MirLua: Another one fix for vs2010
git-svn-id: http://svn.miranda-ng.org/main/trunk@15704 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirLua/src/mlua_metatable.h')
-rw-r--r--plugins/MirLua/src/mlua_metatable.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/plugins/MirLua/src/mlua_metatable.h b/plugins/MirLua/src/mlua_metatable.h
index b0483a2f10..dd8f50032d 100644
--- a/plugins/MirLua/src/mlua_metatable.h
+++ b/plugins/MirLua/src/mlua_metatable.h
@@ -25,16 +25,6 @@ private:
static const char *name;
static std::map<std::string, MTField*> fields;
- template<typename R> static int GetType(R T::*) { return NULL; }
-
- template<> static int GetType(__int32 T::*) { return LUA_TINTEGER; }
- template<> static int GetType(unsigned __int32 T::*) { return LUA_TINTEGER; }
- template<> static int GetType(__int64 T::*) { return LUA_TINTEGER; }
- template<> static int GetType(unsigned __int64 T::*) { return LUA_TINTEGER; }
-
- template<> static int GetType(char* T::*) { return LUA_TSTRINGA; }
- template<> static int GetType(wchar_t* T::*) { return LUA_TSTRINGW; }
-
template<typename R>
static R GetValue(const T *obj, size_t offset, size_t size)
{
@@ -136,10 +126,9 @@ public:
}
template<typename R>
- MT& Field(R T::*M, const char *name, int type = LUA_TNONE, size_t size = sizeof(R))
+ MT& Field(R T::*M, const char *name, int type, size_t size = sizeof(R))
{
size_t offset = reinterpret_cast<size_t>(&(((T*)0)->*M));
- if (type == LUA_TNONE) type = GetType(M);
if (type != LUA_TNONE)
fields[name] = new MTField(offset, size, type);
return *this;