diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 | |
parent | Initial commit. (diff) | |
download | libreoffice-upstream/4%7.4.7.tar.xz libreoffice-upstream/4%7.4.7.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1')
-rwxr-xr-x | external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 b/external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 new file mode 100755 index 000000000..c7b288d72 --- /dev/null +++ b/external/gpgmepp/0001-cpp-Fix-building-with-C-11.patch.1 @@ -0,0 +1,72 @@ +From f02c20cc9c5756690b07abfd02a43533547ba2ef Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= <dev@ingo-kloecker.de> +Date: Fri, 19 Aug 2022 11:05:37 +0200 +Subject: [PATCH] cpp: Fix building with C++11 + +* lang/cpp/src/importresult.cpp (ImportResult::mergeWith): Replace +'auto' in lambdas with the actual type. +-- + +Generic lambdas require C++14. + +GnuPG-bug-id: 6141 +--- + lang/cpp/src/importresult.cpp | 14 +++++++------- + 1 file changed, 7 insertions(+), 7 deletions(-) + +diff --git a/lang/cpp/src/importresult.cpp b/lang/cpp/src/importresult.cpp +index 06258729..0a7ad03d 100644 +--- a/lang/cpp/src/importresult.cpp ++++ b/lang/cpp/src/importresult.cpp +@@ -152,17 +152,17 @@ void GpgME::ImportResult::mergeWith(const ImportResult &other) + } + // was this key also considered during the first import + const auto consideredInFirstImports = +- std::any_of(std::begin(d->imports), std::end(d->imports), [fpr](const auto i) { ++ std::any_of(std::begin(d->imports), std::end(d->imports), [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr); + }); + // did we see this key already in the list of keys of the other import + const auto consideredInPreviousOtherImports = +- std::any_of(std::begin(other.d->imports), it, [fpr](const auto i) { ++ std::any_of(std::begin(other.d->imports), it, [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr); + }); + // was anything added to this key during the other import + const auto changedInOtherImports = +- std::any_of(std::begin(other.d->imports), std::end(other.d->imports), [fpr](const auto i) { ++ std::any_of(std::begin(other.d->imports), std::end(other.d->imports), [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr) && (i->status != 0); + }); + if (consideredInFirstImports && !consideredInPreviousOtherImports) { +@@ -177,15 +177,15 @@ void GpgME::ImportResult::mergeWith(const ImportResult &other) + + // now do the same for the secret key counts + const auto secretKeyConsideredInFirstImports = +- std::any_of(std::begin(d->imports), std::end(d->imports), [fpr](const auto i) { ++ std::any_of(std::begin(d->imports), std::end(d->imports), [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr) && (i->status & GPGME_IMPORT_SECRET); + }); + const auto secretKeyConsideredInPreviousOtherImports = +- std::any_of(std::begin(other.d->imports), it, [fpr](const auto i) { ++ std::any_of(std::begin(other.d->imports), it, [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr) && (i->status & GPGME_IMPORT_SECRET); + }); + const auto secretKeyChangedInOtherImports = +- std::any_of(std::begin(other.d->imports), std::end(other.d->imports), [fpr](const auto i) { ++ std::any_of(std::begin(other.d->imports), std::end(other.d->imports), [fpr](const gpgme_import_status_t i) { + return i->fpr && !strcmp(i->fpr, fpr) && (i->status & GPGME_IMPORT_SECRET) && (i->status != GPGME_IMPORT_SECRET); + }); + if (secretKeyConsideredInFirstImports && !secretKeyConsideredInPreviousOtherImports) { +@@ -204,7 +204,7 @@ void GpgME::ImportResult::mergeWith(const ImportResult &other) + d->imports.reserve(d->imports.size() + other.d->imports.size()); + std::transform(std::begin(other.d->imports), std::end(other.d->imports), + std::back_inserter(d->imports), +- [](const auto import) { ++ [](const gpgme_import_status_t import) { + gpgme_import_status_t copy = new _gpgme_import_status{*import}; + if (import->fpr) { + copy->fpr = strdup(import->fpr); +-- +2.34.1 + |