diff --git a/src/common/mathutil.h b/src/common/mathutil.h index d142b35de..46b9eac13 100644 --- a/src/common/mathutil.h +++ b/src/common/mathutil.h @@ -1032,8 +1032,8 @@ inline uint32_t BitfieldReverse(uint32_t value) } // Count the 1 bits. -#if defined(_MSC_VER) && !defined(__clang__) -# if defined(_M_IX86) || defined(_M_X64) +#if defined(ANGLE_PLATFORM_WINDOWS) && !defined(__clang__) +# if defined(_M_IX86) || defined(_M_X64) || defined(__i386__) || defined(__x86_64__) namespace priv { // Check POPCNT instruction support and cache the result. @@ -1076,7 +1076,7 @@ inline int BitCount(uint64_t bits) { if (priv::kHasPopcnt) { -# if defined(_M_X64) +# if defined(_M_X64) || defined(__x86_64__) return static_cast(__popcnt64(bits)); # else // x86 return static_cast(__popcnt(static_cast(bits >> 32)) + @@ -1109,7 +1109,7 @@ inline int BitCount(uint64_t bits) return static_cast(vget_lane_u64(vpaddl_u32(vpaddl_u16(vpaddl_u8(vsum))), 0)); } # endif // defined(_M_IX86) || defined(_M_X64) -#endif // defined(_MSC_VER) && !defined(__clang__) +#endif // defined(ANGLE_PLATFORM_WINDOWS) && !defined(__clang__) #if defined(ANGLE_PLATFORM_POSIX) || defined(__clang__) inline int BitCount(uint32_t bits) diff --git a/src/common/serializer/JsonSerializer.cpp b/src/common/serializer/JsonSerializer.cpp index 0028331d9..e675c406b 100644 --- a/src/common/serializer/JsonSerializer.cpp +++ b/src/common/serializer/JsonSerializer.cpp @@ -173,7 +173,7 @@ void JsonSerializer::addValue(const std::string &name, rapidjson::Value &&value) } else { - rapidjson::Value nameValue(name, mAllocator); + rapidjson::Value nameValue; mDoc.AddMember(nameValue, std::move(value), mAllocator); } } diff --git a/src/compiler/translator/Compiler.cpp b/src/compiler/translator/Compiler.cpp index 485b4bd38..cbe275733 100644 --- a/src/compiler/translator/Compiler.cpp +++ b/src/compiler/translator/Compiler.cpp @@ -1213,7 +1213,7 @@ bool TCompiler::checkAndSimplifyAST(TIntermBlock *root, bool TCompiler::resizeClipAndCullDistanceBuiltins(TIntermBlock *root) { - auto resizeVariable = [=](const ImmutableString &name, uint32_t size, uint32_t maxSize) { + auto resizeVariable = [=, this](const ImmutableString &name, uint32_t size, uint32_t maxSize) { // Skip if the variable is not used or implicitly has the maximum size if (size == 0 || size == maxSize) return true; diff --git a/util/capture/frame_capture_test_utils.cpp b/util/capture/frame_capture_test_utils.cpp index 427844c5d..8c549d1b3 100644 --- a/util/capture/frame_capture_test_utils.cpp +++ b/util/capture/frame_capture_test_utils.cpp @@ -84,7 +84,7 @@ bool LoadTraceInfoFromJSON(const std::string &traceName, return false; } - const rapidjson::Document::Object &meta = doc["TraceMetadata"].GetObj(); + const rapidjson::Document::Object &meta = doc["TraceMetadata"].GetObject(); strncpy(traceInfoOut->name, traceName.c_str(), kTraceInfoMaxNameLen); traceInfoOut->contextClientMajorVersion = meta["ContextClientMajorVersion"].GetInt();