[Libreoffice-commits] core.git: vcl/inc
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Mar 5 20:29:36 UTC 2019
vcl/inc/WidgetThemeLibraryTypes.hxx | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
New commits:
commit 64d287805dd941508a4fa9a9054e687212d4a6d4
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Mar 5 15:37:31 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Tue Mar 5 21:29:13 2019 +0100
Use o3tl::is_typed_flags for ControlState
Change-Id: If54f385e8c7e19106f03f4a52f99bc50b4878f37
Reviewed-on: https://gerrit.libreoffice.org/68760
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/vcl/inc/WidgetThemeLibraryTypes.hxx b/vcl/inc/WidgetThemeLibraryTypes.hxx
index 91116fd6b44a..a00a867d7887 100644
--- a/vcl/inc/WidgetThemeLibraryTypes.hxx
+++ b/vcl/inc/WidgetThemeLibraryTypes.hxx
@@ -12,7 +12,8 @@
#define INCLUDED_VCL_INC_WIDGETTHEMETYPES_HXX
#include <cstdint>
-#include <type_traits> // Used for enum operator
+
+#include <o3tl/typed_flags_set.hxx>
/**
* These types are all based on the supported variants
@@ -216,11 +217,7 @@ enum class ControlState {
CACHING_ALLOWED = 0x8000, ///< Set when the control is completely visible (i.e. not clipped).
};
-inline bool operator& (const ControlState& lhs, const ControlState& rhs)
-{
- return static_cast<std::underlying_type<ControlState>::type>(lhs)
- & static_cast<std::underlying_type<ControlState>::type>(rhs);
-}
+template<> struct o3tl::typed_flags<ControlState>: o3tl::is_typed_flags<ControlState, 0xC06F> {};
/* ButtonValue:
*
More information about the Libreoffice-commits
mailing list