mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-29 03:41:48 +08:00
89a2b29130
* Use VERSION * Add nls feature and gettext deps * Fix export of libintl dep * Fix mingw on windows * Fix crossbuilds * Cleanup * Keep translations for nls * Add license * [shiftmedia-libgpg-error] Split from pristine source port, update * [libgpg-error] Update, official tarballs, cross builds * [libgcrypt] Official tarballs, fix cross builds * [libgcrypt] Update copyright * [libassuan] Update, official tarballs, cross builds * [gpgme] Update, cleanup * [gpgme] Update copyright * Update versions * [shiftmedia-libgcrypt] Update * No port libgpg * Add missing version file * Use make OPTIONS * Update versions * Revise build-tools pattern
57 lines
3.5 KiB
Diff
57 lines
3.5 KiB
Diff
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.11.0
|
|
|