summaryrefslogtreecommitdiff
path: root/tools/aapt2/ResourceValues.h
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2021-05-04 22:49:07 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2021-05-04 22:49:07 +0000
commitea15d442b28f74e42b9f6f30e2fcfd8042e6d6b1 (patch)
treebb28d030e41ebc7ef0262d3a4c21b2fdfa053ff3 /tools/aapt2/ResourceValues.h
parent646ce7eea20512d469fbd4f679fef50e1513883d (diff)
parenta2b4fcde92b6c841c6fd6532016608a6bec05a30 (diff)
Merge "Fix uninitialized macro reference member" into sc-dev
Diffstat (limited to 'tools/aapt2/ResourceValues.h')
-rw-r--r--tools/aapt2/ResourceValues.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/aapt2/ResourceValues.h b/tools/aapt2/ResourceValues.h
index d11b013f14d5..d903b7e1b8b3 100644
--- a/tools/aapt2/ResourceValues.h
+++ b/tools/aapt2/ResourceValues.h
@@ -154,18 +154,18 @@ struct BaseItem : public Item {
// A reference can be symbolic (with the name set to a valid resource name) or be
// numeric (the id is set to a valid resource ID).
struct Reference : public TransformableItem<Reference, BaseItem<Reference>> {
- enum class Type {
+ enum class Type : uint8_t {
kResource,
kAttribute,
};
Maybe<ResourceName> name;
Maybe<ResourceId> id;
+ std::optional<uint32_t> type_flags;
Reference::Type reference_type;
bool private_reference = false;
bool is_dynamic = false;
- std::optional<uint32_t> type_flags;
- bool allow_raw;
+ bool allow_raw = false;
Reference();
explicit Reference(const ResourceNameRef& n, Type type = Type::kResource);