summaryrefslogtreecommitdiff
path: root/core/fpdfdoc/cpdf_aaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfdoc/cpdf_aaction.cpp')
-rw-r--r--core/fpdfdoc/cpdf_aaction.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/core/fpdfdoc/cpdf_aaction.cpp b/core/fpdfdoc/cpdf_aaction.cpp
index 033bf03a6a..fd29b52ef6 100644
--- a/core/fpdfdoc/cpdf_aaction.cpp
+++ b/core/fpdfdoc/cpdf_aaction.cpp
@@ -8,9 +8,13 @@
namespace {
-const char* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO", "PC",
- "PV", "PI", "O", "C", "K", "F", "V", "C",
- "WC", "WS", "DS", "WP", "DP", ""};
+constexpr const char* g_sAATypes[] = {"E", "X", "D", "U", "Fo", "Bl", "PO",
+ "PC", "PV", "PI", "O", "C", "K", "F",
+ "V", "C", "WC", "WS", "DS", "WP", "DP"};
+
+// |g_sAATypes| should have as many elements as enum AActionType.
+static_assert(FX_ArraySize(g_sAATypes) == CPDF_AAction::NumberOfActions,
+ "g_sAATypes count mismatch");
} // namespace