Avoid unreferenced formal parameter warning in get_range_offset_and_length (#1838)

Release builds result in the following warning because `content_length` param was used only inside asserts:

1> cpp-httplib\httplib.h(4933,45): warning C4100: 'content_length': unreferenced formal parameter
This commit is contained in:
Pavel P 2024-05-17 05:56:06 +05:00 committed by GitHub
parent 3b6597bba9
commit 05f9f83240
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -4935,7 +4935,7 @@ get_range_offset_and_length(Range r, size_t content_length) {
assert(0 <= r.first && r.first < static_cast<ssize_t>(content_length));
assert(r.first <= r.second &&
r.second < static_cast<ssize_t>(content_length));
(void)(content_length);
return std::make_pair(r.first, static_cast<size_t>(r.second - r.first) + 1);
}