aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/tls/tls_reader.h
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-23 18:29:16 +0200
committerSimon Warta <[email protected]>2015-06-23 18:49:20 +0200
commite4cfc6684df02e1c1c2b583c764514cfc08e9c39 (patch)
treee8bc73070ddb9cb38594e114e28f4fa1129545f8 /src/lib/tls/tls_reader.h
parentfcb249320e9529c772fde21195659cc81cb57c73 (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.h6
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);
}