summaryrefslogtreecommitdiff
path: root/tools/aapt2/link/ReferenceLinker.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/aapt2/link/ReferenceLinker.cpp')
-rw-r--r--tools/aapt2/link/ReferenceLinker.cpp11
1 files changed, 4 insertions, 7 deletions
diff --git a/tools/aapt2/link/ReferenceLinker.cpp b/tools/aapt2/link/ReferenceLinker.cpp
index a8e510cd6140..414e56eb5dcc 100644
--- a/tools/aapt2/link/ReferenceLinker.cpp
+++ b/tools/aapt2/link/ReferenceLinker.cpp
@@ -109,18 +109,15 @@ class ReferenceLinkerVisitor : public ValueVisitor {
entry.value->Accept(this);
// Now verify that the type of this item is compatible with the
- // attribute it
- // is defined for. We pass `nullptr` as the DiagMessage so that this
- // check is
- // fast and we avoid creating a DiagMessage when the match is
- // successful.
- if (!symbol->attribute->Matches(entry.value.get(), nullptr)) {
+ // attribute it is defined for. We pass `nullptr` as the DiagMessage so that this
+ // check is fast and we avoid creating a DiagMessage when the match is successful.
+ if (!symbol->attribute->Matches(*entry.value, nullptr)) {
// The actual type of this item is incompatible with the attribute.
DiagMessage msg(entry.key.GetSource());
// Call the matches method again, this time with a DiagMessage so we
// fill in the actual error message.
- symbol->attribute->Matches(entry.value.get(), &msg);
+ symbol->attribute->Matches(*entry.value, &msg);
context_->GetDiagnostics()->Error(msg);
error_ = true;
}