Skip to content

Commit

Permalink
[MSVC] Fix workflow name, indent, name style.
Browse files Browse the repository at this point in the history
Fix workflow name in `.github/workflows/reusable-build-on-windows-msvc.yml`.

Fix indent in `test/CMakeLists.txt`.

Fix variable name style in `include/common/int128.h`. Change from `leading_zero` to `LeadingZero`.

Signed-off-by: Wang Jikai <[email protected]>
  • Loading branch information
am009 authored and hydai committed Sep 12, 2023
1 parent 7cc65d1 commit 50778b1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/reusable-build-on-windows-msvc.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build on Windows
name: Build on Windows with MSVC

on:
workflow_call:
Expand Down
10 changes: 5 additions & 5 deletions include/common/int128.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,14 +282,14 @@ class uint128_t {
constexpr uint64_t high() const noexcept { return High; }
constexpr unsigned int clz() const noexcept {
#if defined(_MSC_VER) && !defined(__clang__)
unsigned long leading_zero = 0;
unsigned long LeadingZero = 0;
if (High) {
_BitScanReverse64(&leading_zero, High);
return (63 - leading_zero);
_BitScanReverse64(&LeadingZero, High);
return (63 - LeadingZero);
}
if (Low) {
_BitScanReverse64(&leading_zero, Low);
return (63 - leading_zero) + 64;
_BitScanReverse64(&LeadingZero, Low);
return (63 - LeadingZero) + 64;
}
return 128;
#else
Expand Down
10 changes: 5 additions & 5 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ endif()

if(CMAKE_CXX_COMPILER_ID MATCHES "MSVC")
set_property(
DIRECTORY
APPEND
PROPERTY COMPILE_OPTIONS
/wd4267 # conversion from 'size_t' to 'const uint32_t', possible loss of data
/wd4146 # unary minus operator applied to unsigned type, result still unsigned (`UINT32_C(-1)`)
DIRECTORY
APPEND
PROPERTY COMPILE_OPTIONS
/wd4267 # conversion from 'size_t' to 'const uint32_t', possible loss of data
/wd4146 # unary minus operator applied to unsigned type, result still unsigned (`UINT32_C(-1)`)
)
endif()

Expand Down

0 comments on commit 50778b1

Please sign in to comment.