aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils/http_util
diff options
context:
space:
mode:
authorSimon Warta <[email protected]>2015-06-23 18:22:19 +0200
committerSimon Warta <[email protected]>2015-06-23 18:22:19 +0200
commitfcb249320e9529c772fde21195659cc81cb57c73 (patch)
tree883a3e2e0c562a915dfaa555ed5471a32bef5262 /src/lib/utils/http_util
parent345ca08a751ae2969cfb78ef38fddfa0f0f30c00 (diff)
lib/utils: Convert &vec[0] to vec.data()
Diffstat (limited to 'src/lib/utils/http_util')
-rw-r--r--src/lib/utils/http_util/http_util.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/utils/http_util/http_util.cpp b/src/lib/utils/http_util/http_util.cpp
index 913d4fd19..1a15d6418 100644
--- a/src/lib/utils/http_util/http_util.cpp
+++ b/src/lib/utils/http_util/http_util.cpp
@@ -123,7 +123,7 @@ Response http_sync(http_exch_fn http_transact,
if(content_type != "")
outbuf << "Content-Type: " << content_type << "\r\n";
outbuf << "Connection: close\r\n\r\n";
- outbuf.write(reinterpret_cast<const char*>(&body[0]), body.size());
+ outbuf.write(reinterpret_cast<const char*>(body.data()), body.size());
std::istringstream io(http_transact(hostname, outbuf.str()));
@@ -171,8 +171,8 @@ Response http_sync(http_exch_fn http_transact,
std::vector<byte> buf(4096);
while(io.good())
{
- io.read(reinterpret_cast<char*>(&buf[0]), buf.size());
- resp_body.insert(resp_body.end(), &buf[0], &buf[io.gcount()]);
+ io.read(reinterpret_cast<char*>(buf.data()), buf.size());
+ resp_body.insert(resp_body.end(), buf.data(), &buf[io.gcount()]);
}
const std::string header_size = search_map(headers, std::string("Content-Length"));