Skip to content

Commit

Permalink
Fix building with libstdc++ 13
Browse files Browse the repository at this point in the history
It doesn't have std::ranges::to() yet.
  • Loading branch information
KitsuneRal committed Sep 13, 2024
1 parent 247686e commit 7c0ef43
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions Quotient/jobs/basejob.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,13 +416,12 @@ void BaseJob::gotReply()
d->rawResponse = reply()->readAll();
statusSoFar = d->parseJson();
if (statusSoFar.good()) {
auto filteredView =
std::views::filter(expectedKeys(), [responseObject = jsonData()](const QString& k) {
return !responseObject.contains(k);
});
if (const auto missingKeys =
(std::views::filter(expectedKeys(),
[responseObject = jsonData()](const QString& k) {
return !responseObject.contains(k);
})
| std::ranges::to<QStringList>())
.join(u',');
QStringList(filteredView.begin(), filteredView.end()).join(u',');
!missingKeys.isEmpty()) [[unlikely]]
statusSoFar = { IncorrectResponse,
tr("Required JSON keys missing: ") + missingKeys };
Expand Down

0 comments on commit 7c0ef43

Please sign in to comment.