aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpclient.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenhttp/httpclient.cpp')
-rw-r--r--src/zenhttp/httpclient.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/zenhttp/httpclient.cpp b/src/zenhttp/httpclient.cpp
index f94c58581..281d512cf 100644
--- a/src/zenhttp/httpclient.cpp
+++ b/src/zenhttp/httpclient.cpp
@@ -107,17 +107,14 @@ HttpClientBase::GetAccessToken()
std::vector<std::pair<uint64_t, uint64_t>>
HttpClient::Response::GetRanges(std::span<const std::pair<uint64_t, uint64_t>> OffsetAndLengthPairs) const
{
- std::vector<std::pair<uint64_t, uint64_t>> Result;
- Result.reserve(OffsetAndLengthPairs.size());
if (Ranges.empty())
{
- for (const std::pair<uint64_t, uint64_t>& Range : OffsetAndLengthPairs)
- {
- Result.emplace_back(std::make_pair(Range.first, Range.second));
- }
- return Result;
+ return {};
}
+ std::vector<std::pair<uint64_t, uint64_t>> Result;
+ Result.reserve(OffsetAndLengthPairs.size());
+
auto BoundaryIt = Ranges.begin();
auto OffsetAndLengthPairIt = OffsetAndLengthPairs.begin();
while (OffsetAndLengthPairIt != OffsetAndLengthPairs.end())