aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Geometry.h
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-03-19 10:40:48 +1100
committerNeil <nyamatongwe@gmail.com>2021-03-19 10:40:48 +1100
commit25aca885085525118aec6fee7c1ff49442d90582 (patch)
tree8bcc546855b4f80a92bd9b7f9912c5b907310c26 /src/Geometry.h
parent4c086ac7bebe13bcd2146f4e2cebc40510a7223c (diff)
downloadscintilla-mirror-25aca885085525118aec6fee7c1ff49442d90582.tar.gz
Switch enum to enum class.
Diffstat (limited to 'src/Geometry.h')
-rw-r--r--src/Geometry.h6
1 files changed, 6 insertions, 0 deletions
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 <typename T>
+constexpr bool FlagSet(T value, T test) {
+ return (static_cast<int>(value) & static_cast<int>(test)) == static_cast<int>(test);
+}
+
/**
* A geometric point class.
* Point is similar to the Win32 POINT and GTK+ GdkPoint types.