diff options
Diffstat (limited to 'fpdfsdk/fsdk_mgr.cpp')
-rw-r--r-- | fpdfsdk/fsdk_mgr.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fpdfsdk/fsdk_mgr.cpp b/fpdfsdk/fsdk_mgr.cpp index f7fdae6dd8..144bea4bc8 100644 --- a/fpdfsdk/fsdk_mgr.cpp +++ b/fpdfsdk/fsdk_mgr.cpp @@ -1033,8 +1033,11 @@ bool CPDFSDK_PageView::IsValidAnnot(const CPDF_Annot* p) const { return false; const auto& annots = m_pAnnotList->All(); - std::unique_ptr<const CPDF_Annot> annot(p); - return pdfium::ContainsValue(annots, annot); + auto it = std::find_if(annots.begin(), annots.end(), + [p](const std::unique_ptr<CPDF_Annot>& annot) { + return annot.get() == p; + }); + return it != annots.end(); } CPDFSDK_Annot* CPDFSDK_PageView::GetFocusAnnot() { |