Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e8e793a3 authored by Ryan Prichard's avatar Ryan Prichard
Browse files

[RESTRICT AUTOMERGE] 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
Merged-In: I6c231184c3a4c0e67dd29d43560b0c28778883db
parent b303b74e
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -99,6 +99,13 @@ struct FindEntryResult {
  StringPoolRef entry_string_ref;
};

struct Theme::Entry {
  uint32_t attr_res_id;
  ApkAssetsCookie cookie;
  uint32_t type_spec_flags;
  Res_value value;
};

AssetManager2::AssetManager2() {
  memset(&configuration_, 0, sizeof(configuration_));
}
@@ -1411,13 +1418,6 @@ Theme::Theme(AssetManager2* asset_manager) : asset_manager_(asset_manager) {

Theme::~Theme() = default;

struct Theme::Entry {
  uint32_t attr_res_id;
  ApkAssetsCookie cookie;
  uint32_t type_spec_flags;
  Res_value value;
};

namespace {
struct ThemeEntryKeyComparer {
  bool operator() (const Theme::Entry& entry, uint32_t attr_res_id) const noexcept {