aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorNeil <nyamatongwe@gmail.com>2021-05-28 09:29:15 +1000
committerNeil <nyamatongwe@gmail.com>2021-05-28 09:29:15 +1000
commitdc2e91331dab55730cbd29d4d64a37adc26ed2a6 (patch)
treef227285651267985458d13f73e5b08d4b8f8d8f8 /include
parent731550032428395d08ff082dc7bb4d2015d20c47 (diff)
downloadscintilla-mirror-dc2e91331dab55730cbd29d4d64a37adc26ed2a6.tar.gz
Fix FlagSet to return true if any flags set.
Diffstat (limited to 'include')
-rw-r--r--include/ScintillaTypes.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/ScintillaTypes.h b/include/ScintillaTypes.h
index 6b5714b69..5b9b8023f 100644
--- a/include/ScintillaTypes.h
+++ b/include/ScintillaTypes.h
@@ -775,10 +775,10 @@ constexpr KeyMod operator&(KeyMod a, KeyMod b) noexcept {
return static_cast<KeyMod>(static_cast<int>(a) & static_cast<int>(b));
}
-// Test if an enum class value has the bit flag(s) of test set.
+// Test if an enum class value has some 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);
+ return (static_cast<int>(value) & static_cast<int>(test)) != 0;
}
}