aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ffi/ffi.cpp
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-26 10:56:37 +0200
committerSimon Warta <[email protected]>2015-06-27 10:57:40 +0200
commit9f8f8bc3951f3b9a8da871b5e5ee0a75be0bace2 (patch)
tree9be760e3232b3ee8260b2160c54c7d3c0a774030 /src/lib/ffi/ffi.cpp
parentc0d847700c2905d9f7eecf2835d2750b564fc65b (diff)
lib/ffi: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/ffi/ffi.cpp')
-rw-r--r--src/lib/ffi/ffi.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/ffi/ffi.cpp b/src/lib/ffi/ffi.cpp
index 2151c33a9..b8962d034 100644
--- a/src/lib/ffi/ffi.cpp
+++ b/src/lib/ffi/ffi.cpp
@@ -109,7 +109,7 @@ inline int write_output(uint8_t out[], size_t* out_len, const uint8_t buf[], siz
*out_len = buf_len;
if(avail >= buf_len)
{
- Botan::copy_mem(out, &buf[0], buf_len);
+ Botan::copy_mem(out, buf, buf_len);
return 0;
}
return -1;
@@ -118,7 +118,7 @@ inline int write_output(uint8_t out[], size_t* out_len, const uint8_t buf[], siz
template<typename Alloc>
int write_vec_output(uint8_t out[], size_t* out_len, const std::vector<uint8_t, Alloc>& buf)
{
- return write_output(out, out_len, &buf[0], buf.size());
+ return write_output(out, out_len, buf.data(), buf.size());
}
inline int write_str_output(uint8_t out[], size_t* out_len, const std::string& str)
@@ -450,7 +450,7 @@ int botan_cipher_update(botan_cipher_t cipher_obj,
if(mbuf.size() <= output_size)
{
- copy_mem(output, &mbuf[0], mbuf.size());
+ copy_mem(output, mbuf.data(), mbuf.size());
mbuf.clear();
return 0;
}
@@ -464,7 +464,7 @@ int botan_cipher_update(botan_cipher_t cipher_obj,
*output_written = mbuf.size();
if(output_size >= mbuf.size())
{
- copy_mem(output, &mbuf[0], mbuf.size());
+ copy_mem(output, mbuf.data(), mbuf.size());
mbuf.clear();
return 0;
}
@@ -482,7 +482,7 @@ int botan_cipher_update(botan_cipher_t cipher_obj,
const size_t taken = round_down(input_size, ud);
*input_consumed = taken;
*output_size = taken;
- copy_mem(&output[0], input, taken);
+ copy_mem(output, input, taken);
ocm->update_in_place(output, taken);
return 0;
}
@@ -493,7 +493,7 @@ int botan_cipher_update(botan_cipher_t cipher_obj,
while(input_size >= ud && output_size >= ud)
{
- copy_mem(&mbuf[0], input, ud);
+ copy_mem(mbuf.data(), input, ud);
cipher.update(mbuf);
input_size -= ud;