Mark buffer variables const.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
2c13f03a1c
commit
9523de8788
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue