summaryrefslogtreecommitdiff
path: root/tools/aapt2/Source.h
diff options
context:
space:
mode:
authorAdam Lesinski <adamlesinski@google.com>2015-11-20 15:32:30 -0800
committerAdam Lesinski <adamlesinski@google.com>2015-11-23 12:01:15 -0800
commita587065721053ad54e34f484868142407d59512d (patch)
tree57efbb55d03b5e68610802da8e469d5d48a29078 /tools/aapt2/Source.h
parent78de1bcbbdad03d893d0b1df5372732cf6d0d934 (diff)
AAPT2: Verify min/max attr fields
Integers are now checked to see if they fall in the range of min/max for the attribute they are assigned. Change-Id: I42c435b15fd3f0bd23691c83efccce4ad5973276
Diffstat (limited to 'tools/aapt2/Source.h')
-rw-r--r--tools/aapt2/Source.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/aapt2/Source.h b/tools/aapt2/Source.h
index 8af203cdad0e..319528e0ea1b 100644
--- a/tools/aapt2/Source.h
+++ b/tools/aapt2/Source.h
@@ -58,6 +58,10 @@ inline ::std::ostream& operator<<(::std::ostream& out, const Source& source) {
return out;
}
+inline bool operator==(const Source& lhs, const Source& rhs) {
+ return lhs.path == rhs.path && lhs.line == rhs.line;
+}
+
inline bool operator<(const Source& lhs, const Source& rhs) {
int cmp = lhs.path.compare(rhs.path);
if (cmp < 0) return true;