diff options
author | Seigo Nonaka <nona@google.com> | 2018-02-05 16:09:22 -0800 |
---|---|---|
committer | Seigo Nonaka <nona@google.com> | 2018-02-05 16:29:47 -0800 |
commit | 8ed75527f370998ee20fe4b8a15b511b33878653 (patch) | |
tree | 2484870f1951e73672a55a2470433a8443f5bfe9 | |
parent | c573e914829eece9dba3abf5a9c707e1c56606b5 (diff) | |
download | minikin-8ed75527f370998ee20fe4b8a15b511b33878653.tar.gz |
Introduce equal operator to MinikinPaint
Bug: 67504091
Test: N/A
Change-Id: Idec596ea1e2f3923072b9aca7426d7725df25cd9
-rw-r--r-- | include/minikin/MinikinFont.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/minikin/MinikinFont.h b/include/minikin/MinikinFont.h index 74a3811..4e748a7 100644 --- a/include/minikin/MinikinFont.h +++ b/include/minikin/MinikinFont.h @@ -64,6 +64,14 @@ struct MinikinPaint { MinikinPaint(MinikinPaint&&) = default; MinikinPaint& operator=(MinikinPaint&&) = default; + inline bool operator==(const MinikinPaint& paint) { + return size == paint.size && scaleX == paint.scaleX && skewX == paint.skewX && + letterSpacing == paint.letterSpacing && wordSpacing == paint.wordSpacing && + paintFlags == paint.paintFlags && localeListId == paint.localeListId && + fontStyle == paint.fontStyle && familyVariant == paint.familyVariant && + fontFeatureSettings == paint.fontFeatureSettings && font.get() == paint.font.get(); + } + private: // Forbid implicit copy and assign. Use copyFrom instead. MinikinPaint(const MinikinPaint&) = default; |