Skip to content

Commit ea4b7bc

Browse files
committed
Fix deprecated usage of C-style enums
Arithmetic expressions using C-style enums trigger a warning with -Wdeprecated-enum-float-conversion. Signed-off-by: Taylor Foxhall <[email protected]>
1 parent 410f71c commit ea4b7bc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

src/groups/mqb/mqbu/mqbu_storagekey.t.cpp

+3-4
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include <bdlde_md5.h>
3333
#include <bsl_set.h>
3434
#include <bslh_hash.h>
35+
#include <bsls_keyword.h>
3536
#include <bsls_timeutil.h>
3637
#include <bsls_types.h>
3738

@@ -362,9 +363,7 @@ void test4_customHashUniqueness()
362363
// created upon insertion of objects in the map uses the default
363364
// allocator.
364365

365-
enum {
366-
k_NUM_ELEMS = 10000 // 10K
367-
};
366+
BSLS_KEYWORD_CONSTEXPR bsl::size_t k_NUM_ELEMS = 10000; // 10K
368367

369368
typedef bsl::unordered_set<mqbu::StorageKey>::const_iterator CITER;
370369
typedef bsl::vector<mqbu::StorageKey> StorageKeys;
@@ -997,4 +996,4 @@ int main(int argc, char* argv[])
997996
TEST_EPILOG(mwctst::TestHelper::e_CHECK_GBL_ALLOC);
998997
}
999998

1000-
// ----------------------------------------------------------------------------
999+
// ----------------------------------------------------------------------------

0 commit comments

Comments
 (0)