From dea4b0f7530838527b8615181d4b71ceeb21a6b4 Mon Sep 17 00:00:00 2001 From: Sergei Ilinykh Date: Thu, 13 Jun 2024 00:24:15 +0300 Subject: [PATCH] rewrite photos filter w/o ranges --- src/vcardfactory.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/vcardfactory.cpp b/src/vcardfactory.cpp index 987145f44..dcac8f2c8 100644 --- a/src/vcardfactory.cpp +++ b/src/vcardfactory.cpp @@ -260,9 +260,10 @@ Task *VCardFactory::setVCard(PsiAccount *account, const VCard4::VCard &v, const VCard4::VCard v2 = v; v2.detach(); VCard4::PAdvUris photos; - for (auto const &uri : - v2.photo() | std::views::filter([](auto const &item) { return item.data.data.isEmpty(); })) { - photos.append(uri); + for (auto const &item : v2.photo()) { + if (item.data.data.isEmpty()) { + photos.append(item); + } } v2.setPhoto(photos); el = v2.toXmlElement(*doc);