diff options
author | cdalton <cdalton@nvidia.com> | 2015-05-11 11:21:23 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-11 11:21:23 -0700 |
commit | 321177052b91ba093d38b3f37f5ae17d6908a4d4 (patch) | |
tree | 5e4bc2000de1921278a42b47dde9c7c68d50e1fb /include | |
parent | f7cc87719e53df86784d0d953b88c45a3be38953 (diff) |
Add assignment op to enum bitfield ops
BUG=skia:
Review URL: https://codereview.chromium.org/1139513002
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrTypes.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h index 67cf4db8d9..c1d324bad0 100644 --- a/include/gpu/GrTypes.h +++ b/include/gpu/GrTypes.h @@ -23,6 +23,9 @@ inline X operator | (X a, X b) { \ return (X) (+a | +b); \ } \ + inline X& operator |= (X& a, X b) { \ + return (a = a | b); \ + } \ \ inline X operator & (X a, X b) { \ return (X) (+a & +b); \ @@ -38,6 +41,7 @@ #define GR_DECL_BITFIELD_OPS_FRIENDS(X) \ friend X operator | (X a, X b); \ + friend X& operator |= (X& a, X b); \ \ friend X operator & (X a, X b); \ \ |