From e4e61cfe69675a5eded4302095648bfccd4391da Mon Sep 17 00:00:00 2001 From: John Wellbelove Date: Mon, 14 Jun 2021 13:11:03 +0100 Subject: [PATCH] Fixed ambiguous function call for clang --- .github/workflows/clang.yml | 2 +- include/etl/mem_cast.h | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) 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); }