aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2015-05-11 11:21:23 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-05-11 11:21:23 -0700
commit321177052b91ba093d38b3f37f5ae17d6908a4d4 (patch)
tree5e4bc2000de1921278a42b47dde9c7c68d50e1fb /include
parentf7cc87719e53df86784d0d953b88c45a3be38953 (diff)
Add assignment op to enum bitfield ops
Diffstat (limited to 'include')
-rw-r--r--include/gpu/GrTypes.h4
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); \
\