From 25aca885085525118aec6fee7c1ff49442d90582 Mon Sep 17 00:00:00 2001 From: Neil Date: Fri, 19 Mar 2021 10:40:48 +1100 Subject: Switch enum to enum class. --- src/Geometry.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/Geometry.h') diff --git a/src/Geometry.h b/src/Geometry.h index cee76498e..35702a468 100644 --- a/src/Geometry.h +++ b/src/Geometry.h @@ -13,6 +13,12 @@ namespace Scintilla { typedef float XYPOSITION; typedef double XYACCUMULATOR; +// Test if an enum class value has the bit flag(s) of test set. +template +constexpr bool FlagSet(T value, T test) { + return (static_cast(value) & static_cast(test)) == static_cast(test); +} + /** * A geometric point class. * Point is similar to the Win32 POINT and GTK+ GdkPoint types. -- cgit v1.2.3