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

Commit 0b179b02 authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "[res] Fix the bag resolution stack"

parents 57da5921 533e8cc3
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1122,9 +1122,7 @@ base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::ResolveBag(

base::expected<const ResolvedBag*, NullOrIOError> AssetManager2::GetBag(uint32_t resid) const {
  auto resid_stacks_it = cached_bag_resid_stacks_.find(resid);
  if (resid_stacks_it != cached_bag_resid_stacks_.end()) {
    resid_stacks_it->second.clear();
  } else {
  if (resid_stacks_it == cached_bag_resid_stacks_.end()) {
    resid_stacks_it = cached_bag_resid_stacks_.emplace(resid, std::vector<uint32_t>{}).first;
  }
  const auto bag = GetBag(resid, resid_stacks_it->second);