summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
Diffstat (limited to 'libs')
-rw-r--r--libs/lua/LuaBridge/detail/Namespace.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/libs/lua/LuaBridge/detail/Namespace.h b/libs/lua/LuaBridge/detail/Namespace.h
index 79a0786d40..92aed81530 100644
--- a/libs/lua/LuaBridge/detail/Namespace.h
+++ b/libs/lua/LuaBridge/detail/Namespace.h
@@ -1658,12 +1658,14 @@ public:
typedef std::map<K, V> LT;
typedef std::pair<const K, V> T;
+ typedef typename std::map<K, V>::size_type T_SIZE;
+
return beginClass<LT> (name)
.addVoidConstructor ()
.addFunction ("empty", &LT::empty)
.addFunction ("size", &LT::size)
.addFunction ("clear", (void (LT::*)())&LT::clear)
- .addFunction ("count", (void (LT::*)())&LT::count)
+ .addFunction ("count", (T_SIZE (LT::*)(const K&) const)&LT::count)
.addExtCFunction ("add", &CFunc::tableToMap<K, V>)
.addExtCFunction ("iter", &CFunc::mapIter<K, V>)
.addExtCFunction ("table", &CFunc::mapToTable<K, V>);