mirror of
https://github.com/ETLCPP/etl.git
synced 2026-06-16 00:46:03 +08:00
Merge branch 'feature/mem_cast' into development
This commit is contained in:
commit
892529b0f2
4
.github/workflows/clang.yml
vendored
4
.github/workflows/clang.yml
vendored
@ -1,7 +1,7 @@
|
||||
name: clang
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [ feature/mem_cast ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
|
||||
@ -18,6 +18,8 @@ jobs:
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y "clang-9" "lldb-9" "lld-9" "clang-format-9"
|
||||
export CC=clang-9
|
||||
export CXX=clang++-9
|
||||
cmake -D BUILD_TESTS=ON ./
|
||||
|
||||
@ -529,7 +529,9 @@ namespace etl
|
||||
//***********************************
|
||||
ETL_NODISCARD size_t alignment() const
|
||||
{
|
||||
const uintptr_t p = reinterpret_cast<uintptr_t>(pbuffer);
|
||||
typedef typename etl::smallest_uint_for_bits<sizeof(uintptr_t)* CHAR_BIT>::type type;
|
||||
|
||||
const type p = reinterpret_cast<type>(pbuffer);
|
||||
|
||||
return 1U << etl::count_trailing_zeros(p);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user