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:
parent
1ab262d48f
commit
7e1242769a
@ -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_; }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user