0
0
mirror of https://github.com/OpenVPN/openvpn3.git synced 2024-09-20 12:12:15 +02:00

Buffer : Added c_str() and length() methods to Buffer so it

can be used like a std::string.
This commit is contained in:
James Yonan 2016-06-09 16:54:26 -06:00
parent 1ab262d48f
commit 7e1242769a

View File

@ -181,6 +181,10 @@ namespace openvpn {
offset_ = size_ = 0;
}
// std::string compatible methods
const T* c_str() const { return c_data(); }
size_t length() const { return size(); }
// return a const pointer to start of array
const T* c_data() const { return data_ + offset_; }