diff --git a/include/tins/internals.h b/include/tins/internals.h index 8806c9d..25debb9 100644 --- a/include/tins/internals.h +++ b/include/tins/internals.h @@ -223,7 +223,7 @@ struct accepts_type bool invoke_loop_cb(Functor& f, Packet& p, typename std::enable_if::value, bool>::type* = 0) { - return f(p); + return f(std::move(p)); } template diff --git a/include/tins/sniffer.h b/include/tins/sniffer.h index 26fd21c..5d853e9 100644 --- a/include/tins/sniffer.h +++ b/include/tins/sniffer.h @@ -139,6 +139,9 @@ namespace Tins { * \code * bool(PDU&); * bool(const PDU&); + * bool(const Packet&); + * bool(Packet&&); + * bool(Packet); * \endcode * * This functor will be called using the each of the sniffed packets @@ -391,7 +394,7 @@ namespace Tins { /** * \brief Iterates over packets sniffed by a BaseSniffer. */ - class SnifferIterator : public std::iterator { + class SnifferIterator : public std::iterator { public: /** * Constructs a SnifferIterator.