summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceTable.cpp
diff options
context:
space:
mode:
author Iurii Makhno <iuriimak@google.com> 2022-02-15 19:33:50 +0000
committer Iurii Makhno <iuriimak@google.com> 2022-02-16 20:23:24 +0000
commitcff10cec6cb6f406f71d42b064d527549cc0cca8 (patch)
tree1d2facf050dc96a030ae07e59e197dec7479733f /tools/aapt2/ResourceTable.cpp
parentdfbac39d3854daabdef722fd62ccb58203ff3e2d (diff)
Switch ResourceName to use ResourceNamedType instead of ResourceType.
DD: go/custom-resource-types-in-aapt2 Bug: b/215108200 Test: Resource_test.cpp Change-Id: I0b97fc0024523700e01adce788bb934d388da288
Diffstat (limited to 'tools/aapt2/ResourceTable.cpp')
-rw-r--r--tools/aapt2/ResourceTable.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/aapt2/ResourceTable.cpp b/tools/aapt2/ResourceTable.cpp
index dae89b0a1de5..98cce268e213 100644
--- a/tools/aapt2/ResourceTable.cpp
+++ b/tools/aapt2/ResourceTable.cpp
@@ -473,7 +473,7 @@ bool ResourceTable::AddResource(NewResource&& res, IDiagnostics* diag) {
}
auto package = FindOrCreatePackage(res.name.package);
- auto type = package->FindOrCreateType(res.name.type);
+ auto type = package->FindOrCreateType(res.name.type.type);
auto entry_it = std::equal_range(type->entries.begin(), type->entries.end(), res.name.entry,
NameEqualRange<ResourceEntry>{});
const size_t entry_count = std::distance(entry_it.first, entry_it.second);
@@ -593,7 +593,7 @@ std::optional<ResourceTable::SearchResult> ResourceTable::FindResource(
return {};
}
- ResourceTableType* type = package->FindType(name.type);
+ ResourceTableType* type = package->FindType(name.type.type);
if (type == nullptr) {
return {};
}
@@ -612,7 +612,7 @@ std::optional<ResourceTable::SearchResult> ResourceTable::FindResource(const Res
return {};
}
- ResourceTableType* type = package->FindType(name.type);
+ ResourceTableType* type = package->FindType(name.type.type);
if (type == nullptr) {
return {};
}
@@ -633,7 +633,7 @@ bool ResourceTable::RemoveResource(const ResourceNameRef& name, ResourceId id) c
return {};
}
- ResourceTableType* type = package->FindType(name.type);
+ ResourceTableType* type = package->FindType(name.type.type);
if (type == nullptr) {
return {};
}