diff options
Diffstat (limited to 'tools/aapt2/ResourceTable.h')
-rw-r--r-- | tools/aapt2/ResourceTable.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/tools/aapt2/ResourceTable.h b/tools/aapt2/ResourceTable.h index bae1d827a841..2e17659b0679 100644 --- a/tools/aapt2/ResourceTable.h +++ b/tools/aapt2/ResourceTable.h @@ -120,18 +120,18 @@ class ResourceEntry { const std::string name; // The entry ID for this resource (the EEEE in 0xPPTTEEEE). - Maybe<ResourceId> id; + std::optional<ResourceId> id; // Whether this resource is public (and must maintain the same entry ID across builds). Visibility visibility; - Maybe<AllowNew> allow_new; + std::optional<AllowNew> allow_new; // The declarations of this resource as overlayable for RROs - Maybe<OverlayableItem> overlayable_item; + std::optional<OverlayableItem> overlayable_item; // The staged resource id for a finalized resource. - Maybe<StagedId> staged_id; + std::optional<StagedId> staged_id; // The resource's values for each configuration. std::vector<std::unique_ptr<ResourceConfigValue>> values; @@ -205,11 +205,11 @@ class ResourceTablePackage { struct ResourceTableEntryView { std::string name; - Maybe<uint16_t> id; + std::optional<uint16_t> id; Visibility visibility; - Maybe<AllowNew> allow_new; - Maybe<OverlayableItem> overlayable_item; - Maybe<StagedId> staged_id; + std::optional<AllowNew> allow_new; + std::optional<OverlayableItem> overlayable_item; + std::optional<StagedId> staged_id; std::vector<const ResourceConfigValue*> values; const ResourceConfigValue* FindValue(const android::ConfigDescription& config, @@ -218,7 +218,7 @@ struct ResourceTableEntryView { struct ResourceTableTypeView { ResourceType type; - Maybe<uint8_t> id; + std::optional<uint8_t> id; Visibility::Level visibility_level = Visibility::Level::kUndefined; // Entries sorted in ascending entry id order. If ids have not been assigned, the entries are @@ -228,7 +228,7 @@ struct ResourceTableTypeView { struct ResourceTablePackageView { std::string name; - Maybe<uint8_t> id; + std::optional<uint8_t> id; // Types sorted in ascending type id order. If ids have not been assigned, the types are sorted by // their declaration order in the ResourceType enum. std::vector<ResourceTableTypeView> types; @@ -309,8 +309,8 @@ class ResourceTable { ResourceEntry* entry; }; - Maybe<SearchResult> FindResource(const ResourceNameRef& name) const; - Maybe<SearchResult> FindResource(const ResourceNameRef& name, ResourceId id) const; + std::optional<SearchResult> FindResource(const ResourceNameRef& name) const; + std::optional<SearchResult> FindResource(const ResourceNameRef& name, ResourceId id) const; bool RemoveResource(const ResourceNameRef& name, ResourceId id) const; // Returns the package struct with the given name, or nullptr if such a package does not |