mirror of
https://github.com/ThePhD/sol2.git
synced 2024-03-22 13:10:44 +08:00
Moved pop from reference to table
This commit is contained in:
parent
d65f6f1291
commit
5229cace49
|
@ -50,10 +50,6 @@ public:
|
||||||
lua_rawgeti(L, LUA_REGISTRYINDEX, ref);
|
lua_rawgeti(L, LUA_REGISTRYINDEX, ref);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pop() const noexcept {
|
|
||||||
lua_pop(L, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
reference(reference&& o) noexcept {
|
reference(reference&& o) noexcept {
|
||||||
L = o.L;
|
L = o.L;
|
||||||
ref = o.ref;
|
ref = o.ref;
|
||||||
|
|
|
@ -168,6 +168,9 @@ public:
|
||||||
return proxy<const table, T>(*this, std::forward<T>(key));
|
return proxy<const table, T>(*this, std::forward<T>(key));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void pop(int n = 1) const noexcept {
|
||||||
|
lua_pop(state(), n);
|
||||||
|
}
|
||||||
private:
|
private:
|
||||||
template<typename T, typename TFx>
|
template<typename T, typename TFx>
|
||||||
table& set_isfunction_fx(std::true_type, T&& key, TFx&& fx) {
|
table& set_isfunction_fx(std::true_type, T&& key, TFx&& fx) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user