diff --git a/.github/workflows/clang.yml b/.github/workflows/clang.yml index 35b012c1..381a76d2 100644 --- a/.github/workflows/clang.yml +++ b/.github/workflows/clang.yml @@ -1,7 +1,7 @@ name: clang on: push: - branches: [ master ] + branches: [ master, feature/mem_cast ] pull_request: branches: [ master ] diff --git a/include/etl/mem_cast.h b/include/etl/mem_cast.h index a10905da..1dc30041 100644 --- a/include/etl/mem_cast.h +++ b/include/etl/mem_cast.h @@ -529,7 +529,9 @@ namespace etl //*********************************** ETL_NODISCARD size_t alignment() const { - const uintptr_t p = reinterpret_cast(pbuffer); + typedef typename etl::smallest_uint_for_bits::type type; + + const uintptr_t p = reinterpret_cast(pbuffer); return 1U << etl::count_trailing_zeros(p); }