diff options
author | jaepark <jaepark@google.com> | 2016-08-31 06:49:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-31 06:49:27 -0700 |
commit | 956553e715787cfc4dd8423d5e9a04a0131878c3 (patch) | |
tree | 08622d504322d5dae37b5bb5025a90c81ebdee6b /fpdfsdk/cpdfsdk_interform.cpp | |
parent | 87dffc0315477150c9c1964913b65bc97bdf654f (diff) | |
download | pdfium-956553e715787cfc4dd8423d5e9a04a0131878c3.tar.xz |
Use enum class for subtypes of CPDF_Annot.
Comparing CFX_ByteString for annotation subtypes is inefficient and
error-prone. This CL uses enum class to compare annotation subtypes.
Also, remove unused IPDFSDK_AnnotHandler::GetType() and
FSDK_XFAWIDGET_TYPENAME.
Review-Url: https://codereview.chromium.org/2295953002
Diffstat (limited to 'fpdfsdk/cpdfsdk_interform.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_interform.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index 1346deb2bc..345487ad49 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -71,8 +71,8 @@ FX_BOOL CPDFSDK_InterForm::HighlightWidgets() { CPDFSDK_Widget* CPDFSDK_InterForm::GetSibling(CPDFSDK_Widget* pWidget, FX_BOOL bNext) const { - std::unique_ptr<CBA_AnnotIterator> pIterator( - new CBA_AnnotIterator(pWidget->GetPageView(), "Widget")); + std::unique_ptr<CBA_AnnotIterator> pIterator(new CBA_AnnotIterator( + pWidget->GetPageView(), CPDF_Annot::Subtype::WIDGET)); if (bNext) return static_cast<CPDFSDK_Widget*>(pIterator->GetNextAnnot(pWidget)); |