Moved pop from reference to table

This commit is contained in:
Rapptz 2014-04-25 21:40:52 -04:00
parent d65f6f1291
commit 5229cace49
2 changed files with 3 additions and 4 deletions

View File

@ -50,10 +50,6 @@ public:
lua_rawgeti(L, LUA_REGISTRYINDEX, ref);
}
void pop() const noexcept {
lua_pop(L, 1);
}
reference(reference&& o) noexcept {
L = o.L;
ref = o.ref;

View File

@ -168,6 +168,9 @@ public:
return proxy<const table, T>(*this, std::forward<T>(key));
}
void pop(int n = 1) const noexcept {
lua_pop(state(), n);
}
private:
template<typename T, typename TFx>
table& set_isfunction_fx(std::true_type, T&& key, TFx&& fx) {