From 3899b4425d4639f92b8b6d2ce5eb681a8ffd57d7 Mon Sep 17 00:00:00 2001 From: Ryan Prichard Date: Wed, 6 Sep 2023 18:15:35 -0700 Subject: Move Theme::Entry definition to top of file It needs to be at least above this line: theme->entries_.reserve(kInitialReserveSize); Otherwise, after upgrading libc++, the compiler fails with errors about an incomplete type, e.g.: include/c++/v1/vector:839:62: error: arithmetic on a pointer to an incomplete type 'android::Theme::Entry' include/c++/v1/__memory/uninitialized_algorithms.h:609:5: error: cannot increment value of type 'std::reverse_iterator' Bug: b/175635923 Test: treehugger Change-Id: I6c231184c3a4c0e67dd29d43560b0c28778883db Merged-In: I6c231184c3a4c0e67dd29d43560b0c28778883db --- libs/androidfw/AssetManager2.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'libs/androidfw/AssetManager2.cpp') diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp index 55cd3d62f006..12be1e0d1bd4 100644 --- a/libs/androidfw/AssetManager2.cpp +++ b/libs/androidfw/AssetManager2.cpp @@ -91,6 +91,12 @@ struct FindEntryResult { StringPoolRef entry_string_ref; }; +struct Theme::Entry { + ApkAssetsCookie cookie; + uint32_t type_spec_flags; + Res_value value; +}; + AssetManager2::AssetManager2() { memset(&configuration_, 0, sizeof(configuration_)); } @@ -1434,12 +1440,6 @@ Theme::Theme(AssetManager2* asset_manager) : asset_manager_(asset_manager) { Theme::~Theme() = default; -struct Theme::Entry { - ApkAssetsCookie cookie; - uint32_t type_spec_flags; - Res_value value; -}; - base::expected Theme::ApplyStyle(uint32_t resid, bool force) { ATRACE_NAME("Theme::ApplyStyle"); -- cgit v1.2.3-59-g8ed1b