diff options
Diffstat (limited to 'Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp')
-rw-r--r-- | Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp b/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp index a98a213..86c26ac 100644 --- a/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp +++ b/Sluift/ElementConvertors/PubSubOwnerRedirectConvertor.cpp @@ -13,32 +13,32 @@ using namespace Swift; PubSubOwnerRedirectConvertor::PubSubOwnerRedirectConvertor() : - GenericLuaElementConvertor<PubSubOwnerRedirect>("pubsub_owner_redirect") { + GenericLuaElementConvertor<PubSubOwnerRedirect>("pubsub_owner_redirect") { } PubSubOwnerRedirectConvertor::~PubSubOwnerRedirectConvertor() { } boost::shared_ptr<PubSubOwnerRedirect> PubSubOwnerRedirectConvertor::doConvertFromLua(lua_State* L) { - boost::shared_ptr<PubSubOwnerRedirect> result = boost::make_shared<PubSubOwnerRedirect>(); - lua_getfield(L, -1, "uri"); - if (lua_isstring(L, -1)) { - result->setURI(std::string(lua_tostring(L, -1))); - } - lua_pop(L, 1); - return result; + boost::shared_ptr<PubSubOwnerRedirect> result = boost::make_shared<PubSubOwnerRedirect>(); + lua_getfield(L, -1, "uri"); + if (lua_isstring(L, -1)) { + result->setURI(std::string(lua_tostring(L, -1))); + } + lua_pop(L, 1); + return result; } void PubSubOwnerRedirectConvertor::doConvertToLua(lua_State* L, boost::shared_ptr<PubSubOwnerRedirect> payload) { - lua_createtable(L, 0, 0); - lua_pushstring(L, payload->getURI().c_str()); - lua_setfield(L, -2, "uri"); + lua_createtable(L, 0, 0); + lua_pushstring(L, payload->getURI().c_str()); + lua_setfield(L, -2, "uri"); } boost::optional<LuaElementConvertor::Documentation> PubSubOwnerRedirectConvertor::getDocumentation() const { - return Documentation( - "PubSubOwnerRedirect", - "This table has the following fields:\n\n" - "- `uri`: string\n" - ); + return Documentation( + "PubSubOwnerRedirect", + "This table has the following fields:\n\n" + "- `uri`: string\n" + ); } |