cleanup compilation warnings with msvc.

This commit is contained in:
greg
2020-10-23 23:01:02 -04:00
parent 6ab2d4f77b
commit 7a96119c37
2 changed files with 8 additions and 3 deletions
+3 -2
View File
@@ -62,10 +62,11 @@ public:
uint64_t operator()(uint64_t boundExcluded) noexcept {
#ifdef PHMAP_HAS_UMUL128
uint64_t h;
uint64_t l = umul128(operator()(), boundExcluded, &h);
(void)umul128(operator()(), boundExcluded, &h);
return h;
#else
return 0;
#endif
return 0;
}
std::array<uint64_t, 4> state() const {
+5 -1
View File
@@ -34,6 +34,10 @@
#include <numeric>
#include "btree_test.h"
#ifdef _MSC_VER
#pragma warning(disable: 4244 4100 4389)
#endif
namespace phmap {
namespace test_internal {
int BaseCountedInstance::num_instances_ = 0;
@@ -207,7 +211,7 @@ public:
int erase(const key_type &key) {
int size = tree_.size();
int res = checker_.erase(key);
int res = (int)checker_.erase(key);
EXPECT_EQ(res, tree_.count(key));
EXPECT_EQ(res, tree_.erase(key));
EXPECT_EQ(tree_.count(key), 0);