vcl/inc/WidgetThemeLibraryTypes.hxx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-)
New commits: commit 64d287805dd941508a4fa9a9054e687212d4a6d4 Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue Mar 5 15:37:31 2019 +0100 Commit: Stephan Bergmann <sberg...@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 <sberg...@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: * _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits