From 5229cace49fc972a33ee8c3d8e9a1698f0d5ab26 Mon Sep 17 00:00:00 2001 From: Rapptz Date: Fri, 25 Apr 2014 21:40:52 -0400 Subject: [PATCH] Moved pop from reference to table --- sol/reference.hpp | 4 ---- sol/table.hpp | 3 +++ 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/sol/reference.hpp b/sol/reference.hpp index b6808960..9acc75ed 100644 --- a/sol/reference.hpp +++ b/sol/reference.hpp @@ -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; diff --git a/sol/table.hpp b/sol/table.hpp index 170e6817..cb12c1ee 100644 --- a/sol/table.hpp +++ b/sol/table.hpp @@ -168,6 +168,9 @@ public: return proxy(*this, std::forward(key)); } + void pop(int n = 1) const noexcept { + lua_pop(state(), n); + } private: template table& set_isfunction_fx(std::true_type, T&& key, TFx&& fx) {