summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Ryan Prichard <rprichard@google.com> 2023-08-30 22:19:30 -0700
committer Ryan Prichard <rprichard@google.com> 2023-08-31 19:06:38 -0700
commit41e15a0f45e4adc9d8193efd0933e6ca879b3c22 (patch)
tree998f8daf34d38c9a8b1f2c35223d56feb0c2dfd8
parentc6d9fb3d770e4f118ba4724025fcb7115fc33101 (diff)
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<android::Theme::Entry *>' Bug: b/175635923 Test: treehugger Change-Id: I6c231184c3a4c0e67dd29d43560b0c28778883db
-rw-r--r--libs/androidfw/AssetManager2.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/androidfw/AssetManager2.cpp b/libs/androidfw/AssetManager2.cpp
index 652346976c67..edccb8a73fc8 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(ApkAssetsList apk_assets, const ResTable_config& configuration) {
configurations_.push_back(configuration);
@@ -1605,12 +1611,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<std::monostate, NullOrIOError> Theme::ApplyStyle(uint32_t resid, bool force) {
ATRACE_NAME("Theme::ApplyStyle");