summaryrefslogtreecommitdiffstats
path: root/searchcore/src/tests/proton/matching
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@broadpark.no>2019-05-23 14:27:52 +0200
committerTor Egge <Tor.Egge@broadpark.no>2019-05-23 14:27:52 +0200
commit7cd0d37f36a731938ee1f95a1e34996cd2a7d5f8 (patch)
tree8e02275c2efa5129473f3a334f7f9dd9e5b17f2a /searchcore/src/tests/proton/matching
parentaaaab3708a6faa16b0577058ffdb2908943c58ff (diff)
Allow enum values to be used directly as mask values.
Diffstat (limited to 'searchcore/src/tests/proton/matching')
-rw-r--r--searchcore/src/tests/proton/matching/handle_recorder/handle_recorder_test.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/searchcore/src/tests/proton/matching/handle_recorder/handle_recorder_test.cpp b/searchcore/src/tests/proton/matching/handle_recorder/handle_recorder_test.cpp
index 62e2bb936c2..4675c09768e 100644
--- a/searchcore/src/tests/proton/matching/handle_recorder/handle_recorder_test.cpp
+++ b/searchcore/src/tests/proton/matching/handle_recorder/handle_recorder_test.cpp
@@ -13,14 +13,9 @@ using namespace proton::matching;
using HandleMap = HandleRecorder::HandleMap;
-constexpr uint32_t details_to_mask(MatchDataDetails requested_details)
-{
- return (1u << static_cast<int>(requested_details));
-}
-
-constexpr uint32_t NormalMask = details_to_mask(MatchDataDetails::Normal);
-constexpr uint32_t CheapMask = details_to_mask(MatchDataDetails::Cheap);
-constexpr uint32_t BothMask = NormalMask | CheapMask;
+constexpr MatchDataDetails NormalMask = MatchDataDetails::Normal;
+constexpr MatchDataDetails CheapMask = MatchDataDetails::Cheap;
+constexpr MatchDataDetails BothMask = static_cast<MatchDataDetails>(static_cast<int>(NormalMask) | static_cast<int>(CheapMask));
void
register_normal_handle(TermFieldHandle handle)