C++11 style fixups
Change-Id: I356d02338820bfef41a9e278c88dafc17cfe1cf9
diff --git a/libs/hwui/utils/Macros.h b/libs/hwui/utils/Macros.h
index b93f720..49d364e7 100644
--- a/libs/hwui/utils/Macros.h
+++ b/libs/hwui/utils/Macros.h
@@ -35,12 +35,12 @@
static_assert(std::is_standard_layout<Type>::value, \
#Type " must have standard layout")
-#define HWUI_ENUM(name, ...) \
- namespace name { \
- enum _##name { \
- __VA_ARGS__ \
- }; \
- } \
- typedef enum name::_##name name##Enum
+#define MAKE_FLAGS_ENUM(enumType) \
+ inline int operator|(enumType lhs, enumType rhs) { \
+ return static_cast<int>(lhs) | static_cast<int>(rhs); \
+ } \
+ inline int operator&(int lhs, enumType rhs) { \
+ return lhs & static_cast<int>(rhs); \
+ }
#endif /* MACROS_H */