summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRyan Mitchell <rtmitchell@google.com>2021-05-03 15:37:00 -0700
committerRyan Mitchell <rtmitchell@google.com>2021-05-03 16:17:28 -0700
commita2b4fcde92b6c841c6fd6532016608a6bec05a30 (patch)
tree6a1f26ac4c0365126a90b1795b5389b532eb23d2 /tools
parentf0d1132b23a1b2d82584d3ad924ae5fea4e2876f (diff)
Fix uninitialized macro reference member
Reference::allow_raw was left uninitialized. Bug: 175616308 Test: aapt2_tests Change-Id: I58a560c7fb278c1aa2b415e456f849999c835155
Diffstat (limited to 'tools')
-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);