From a6fe345be955368a13aea76aefb4db821aad11df Mon Sep 17 00:00:00 2001 From: Adam Lesinski Date: Wed, 9 Dec 2015 15:20:52 -0800 Subject: AAPT2: Fix overlay support Supports the tag and mimics old AAPT behavior of not allowing new resources defined unless was used or --auto-add-overlay was specified. Change-Id: I9b461137357617ade37fd7045b418b8e6450b9c4 --- tools/aapt2/Resource.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tools/aapt2/Resource.cpp') diff --git a/tools/aapt2/Resource.cpp b/tools/aapt2/Resource.cpp index 34dc1d5508e3..9328b697719d 100644 --- a/tools/aapt2/Resource.cpp +++ b/tools/aapt2/Resource.cpp @@ -85,4 +85,12 @@ const ResourceType* parseResourceType(const StringPiece16& str) { return &iter->second; } +bool operator<(const ResourceKey& a, const ResourceKey& b) { + return std::tie(a.name, a.config) < std::tie(b.name, b.config); +} + +bool operator<(const ResourceKeyRef& a, const ResourceKeyRef& b) { + return std::tie(a.name, a.config) < std::tie(b.name, b.config); +} + } // namespace aapt -- cgit v1.2.3-59-g8ed1b