examples : constantify lambda variables
This commit is contained in:
parent
0d4177126b
commit
3aa20e7446
2 changed files with 2 additions and 2 deletions
|
@ -183,7 +183,7 @@ static void test_roundtrip_on_layer(
|
||||||
if (output_scratch.size() < nelements) output_scratch.resize(nelements);
|
if (output_scratch.size() < nelements) output_scratch.resize(nelements);
|
||||||
|
|
||||||
if (max_thread < 1) max_thread = std::thread::hardware_concurrency();
|
if (max_thread < 1) max_thread = std::thread::hardware_concurrency();
|
||||||
int chunk_size = 32*512;
|
const int chunk_size = 32*512;
|
||||||
int num_chunks = (nelements + chunk_size - 1)/chunk_size;
|
int num_chunks = (nelements + chunk_size - 1)/chunk_size;
|
||||||
|
|
||||||
if (num_chunks < 2 || max_thread < 2) {
|
if (num_chunks < 2 || max_thread < 2) {
|
||||||
|
|
|
@ -6936,7 +6936,7 @@ inline bool ClientImpl::process_request(Stream &strm, Request &req,
|
||||||
inline ContentProviderWithoutLength ClientImpl::get_multipart_content_provider(
|
inline ContentProviderWithoutLength ClientImpl::get_multipart_content_provider(
|
||||||
const std::string &boundary, const MultipartFormDataItems &items,
|
const std::string &boundary, const MultipartFormDataItems &items,
|
||||||
const MultipartFormDataProviderItems &provider_items) {
|
const MultipartFormDataProviderItems &provider_items) {
|
||||||
size_t cur_item = 0, cur_start = 0;
|
const size_t cur_item = 0, cur_start = 0;
|
||||||
// cur_item and cur_start are copied to within the std::function and maintain
|
// cur_item and cur_start are copied to within the std::function and maintain
|
||||||
// state between successive calls
|
// state between successive calls
|
||||||
return [&, cur_item, cur_start](size_t offset,
|
return [&, cur_item, cur_start](size_t offset,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue