1
0
mirror of https://github.com/mfontanini/libtins synced 2026-01-23 02:35:57 +01:00

Add RawPDU c'tor for const payload_type&. (#253)

* Add RawPDU c'tor for const payload_type &.

* Correct indentation.
This commit is contained in:
Alex Collins
2017-10-13 04:02:28 +01:00
committed by Matias Fontanini
parent ab2850e22e
commit 04e29858ee
3 changed files with 32 additions and 0 deletions

View File

@@ -96,6 +96,16 @@ public:
RawPDU(ForwardIterator start, ForwardIterator end)
: payload_(start, end) { }
/**
* \brief Creates an instance of RawPDU from a payload_type.
*
* The payload is copied into the RawPDU's internal buffer.
*
* \param data The payload to use.
*/
RawPDU(const payload_type & data)
: payload_(data) { }
#if TINS_IS_CXX11
/**
* \brief Creates an instance of RawPDU from a payload_type.