summaryrefslogtreecommitdiff
path: root/tools/aapt2/format/proto/ProtoDeserialize.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt2/format/proto/ProtoDeserialize.cpp')
-rw-r--r--tools/aapt2/format/proto/ProtoDeserialize.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/tools/aapt2/format/proto/ProtoDeserialize.cpp b/tools/aapt2/format/proto/ProtoDeserialize.cpp
index 3d6975d8d559..d8635a989bed 100644
--- a/tools/aapt2/format/proto/ProtoDeserialize.cpp
+++ b/tools/aapt2/format/proto/ProtoDeserialize.cpp
@@ -635,8 +635,7 @@ std::unique_ptr<Value> DeserializeValueFromPb(const pb::Value& pb_value,
switch (pb_compound_value.value_case()) {
case pb::CompoundValue::kAttr: {
const pb::Attribute& pb_attr = pb_compound_value.attr();
- std::unique_ptr<Attribute> attr = util::make_unique<Attribute>();
- attr->type_mask = pb_attr.format_flags();
+ std::unique_ptr<Attribute> attr = util::make_unique<Attribute>(pb_attr.format_flags());
attr->min_int = pb_attr.min_int();
attr->max_int = pb_attr.max_int();
for (const pb::Attribute_Symbol& pb_symbol : pb_attr.symbol()) {