mirror of
https://github.com/greg7mdp/parallel-hashmap.git
synced 2026-08-29 08:34:39 +08:00
increase warning level in examples, and suppress two more warnings for msvc
This commit is contained in:
Vendored
+2
@@ -124,6 +124,8 @@ endif()
|
||||
if (PHMAP_BUILD_EXAMPLES)
|
||||
if(NOT MSVC)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wcast-align -Wcast-qual -Wdisabled-optimization -Winit-self -Wlogical-op -Wmissing-include-dirs -Woverloaded-virtual -Wredundant-decls -Wshadow -Wstrict-null-sentinel -Wswitch-default -Wno-unused -Wno-unknown-warning-option -Wno-gnu-zero-variadic-macro-arguments")
|
||||
else()
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4")
|
||||
endif()
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
|
||||
Vendored
+3
-2
@@ -33,7 +33,6 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
@@ -59,10 +58,12 @@
|
||||
#pragma warning(push)
|
||||
|
||||
#pragma warning(disable : 4127) // conditional expression is constant
|
||||
#pragma warning(disable : 4324) // structure was padded due to alignment specifier
|
||||
#pragma warning(disable : 4514) // unreferenced inline function has been removed
|
||||
#pragma warning(disable : 4623) // default constructor was implicitly defined as deleted
|
||||
#pragma warning(disable : 4625) // copy constructor was implicitly defined as deleted
|
||||
#pragma warning(disable : 4626) // assignment operator was implicitly defined as deleted
|
||||
#pragma warning(disable : 4710) // function not inlined
|
||||
#pragma warning(disable : 4711) // selected for automatic inline expansion
|
||||
#pragma warning(disable : 4820) // '6' bytes padding added after data member
|
||||
#pragma warning(disable : 4868) // compiler may not enforce left-to-right evaluation order in braced initializer list
|
||||
@@ -430,7 +431,7 @@ struct GroupPortableImpl
|
||||
|
||||
uint32_t CountLeadingEmptyOrDeleted() const {
|
||||
constexpr uint64_t gaps = 0x00FEFEFEFEFEFEFEULL;
|
||||
return (TrailingZeros(((~ctrl & (ctrl >> 7)) | gaps) + 1) + 7) >> 3;
|
||||
return (uint32_t)((TrailingZeros(((~ctrl & (ctrl >> 7)) | gaps) + 1) + 7) >> 3);
|
||||
}
|
||||
|
||||
void ConvertSpecialToEmptyAndFullToDeleted(ctrl_t* dst) const {
|
||||
|
||||
Reference in New Issue
Block a user