Mark buffer variables const.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
tastytea 2020-01-20 02:46:00 +01:00
parent 2c13f03a1c
commit 9523de8788
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
2 changed files with 3 additions and 3 deletions

View File

@ -124,7 +124,7 @@ public:
{
char *cbuf{curl_easy_escape(_connection, url.data(),
static_cast<int>(url.size()))};
string sbuf{cbuf};
const string sbuf{cbuf};
curl_free(cbuf);
return sbuf;
}
@ -146,7 +146,7 @@ public:
{
char *cbuf{curl_easy_unescape(_connection, url.data(),
static_cast<int>(url.size()), nullptr)};
string sbuf{cbuf};
const string sbuf{cbuf};
curl_free(cbuf);
return sbuf;
}

View File

@ -70,7 +70,7 @@ string Connection::get_new_stream_contents()
{
buffer_mutex.lock();
auto &buffer{get_buffer()};
auto buffer_copy{buffer};
const string buffer_copy{buffer};
buffer.clear();
buffer_mutex.unlock();
return buffer_copy;