diff options
author | Simon Warta <[email protected]> | 2015-06-23 18:29:16 +0200 |
---|---|---|
committer | Simon Warta <[email protected]> | 2015-06-23 18:49:20 +0200 |
commit | e4cfc6684df02e1c1c2b583c764514cfc08e9c39 (patch) | |
tree | e8bc73070ddb9cb38594e114e28f4fa1129545f8 /src/lib/tls/tls_reader.h | |
parent | fcb249320e9529c772fde21195659cc81cb57c73 (diff) |
lib/tls: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/tls/tls_reader.h')
-rw-r--r-- | src/lib/tls/tls_reader.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/tls/tls_reader.h b/src/lib/tls/tls_reader.h index f24543edb..c2aef3163 100644 --- a/src/lib/tls/tls_reader.h +++ b/src/lib/tls/tls_reader.h @@ -118,7 +118,7 @@ class TLS_Data_Reader std::vector<byte> v = get_range_vector<byte>(len_bytes, min_bytes, max_bytes); - return std::string(reinterpret_cast<char*>(&v[0]), v.size()); + return std::string(reinterpret_cast<char*>(v.data()), v.size()); } template<typename T> @@ -209,7 +209,7 @@ void append_tls_length_value(std::vector<byte, Alloc>& buf, const std::vector<T, Alloc2>& vals, size_t tag_size) { - append_tls_length_value(buf, &vals[0], vals.size(), tag_size); + append_tls_length_value(buf, vals.data(), vals.size(), tag_size); } template<typename Alloc> @@ -218,7 +218,7 @@ void append_tls_length_value(std::vector<byte, Alloc>& buf, size_t tag_size) { append_tls_length_value(buf, - reinterpret_cast<const byte*>(&str[0]), + reinterpret_cast<const byte*>(str.data()), str.size(), tag_size); } |