From 756b297045c5ec3ce051b48379a692d80398ef47 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Thu, 3 Dec 2015 21:09:03 +0100 Subject: Small cleanup --- louloulibs/xmpp/adhoc_session.cpp | 4 ---- louloulibs/xmpp/adhoc_session.hpp | 7 ++----- louloulibs/xmpp/jid.cpp | 2 -- 3 files changed, 2 insertions(+), 11 deletions(-) diff --git a/louloulibs/xmpp/adhoc_session.cpp b/louloulibs/xmpp/adhoc_session.cpp index bf8d292..dda4bea 100644 --- a/louloulibs/xmpp/adhoc_session.cpp +++ b/louloulibs/xmpp/adhoc_session.cpp @@ -13,10 +13,6 @@ AdhocSession::AdhocSession(const AdhocCommand& command, const std::string& owner { } -AdhocSession::~AdhocSession() -{ -} - const AdhocStep& AdhocSession::get_next_step() { assert(this->current_step < this->command.callbacks.size()); diff --git a/louloulibs/xmpp/adhoc_session.hpp b/louloulibs/xmpp/adhoc_session.hpp index 05afc91..7f07dc1 100644 --- a/louloulibs/xmpp/adhoc_session.hpp +++ b/louloulibs/xmpp/adhoc_session.hpp @@ -16,17 +16,15 @@ class AdhocSession; * A function executed as an ad-hoc command step. It takes a * XmlNode and modifies it accordingly (inserting for example an * node, or a data form…). - * TODO fix this: - * It also must call one of step_passed(), cancel() etc on the AdhocSession object. */ -typedef std::function AdhocStep; +using AdhocStep = std::function; class AdhocSession { public: explicit AdhocSession(const AdhocCommand& command, const std::string& owner_jid, const std::string& to_jid); - ~AdhocSession(); + ~AdhocSession() = default; /** * Return the function to be executed, found in our AdhocCommand, for the * current_step. And increment the current_step. @@ -52,7 +50,6 @@ public: return this->owner_jid; } - private: /** * A reference of the command concerned by this session. Used for example diff --git a/louloulibs/xmpp/jid.cpp b/louloulibs/xmpp/jid.cpp index e6fee45..dcd7012 100644 --- a/louloulibs/xmpp/jid.cpp +++ b/louloulibs/xmpp/jid.cpp @@ -30,8 +30,6 @@ Jid::Jid(const std::string& jid) this->domain = jid.substr(at, slash - at); } -#include - static constexpr size_t max_jid_part_len = 1023; std::string jidprep(const std::string& original) -- cgit v1.2.3