From f9f58ce2f568d8e3d39acad746242bbe340f68cc Mon Sep 17 00:00:00 2001 From: Dan Engelbrecht Date: Fri, 29 Apr 2022 08:52:01 +0200 Subject: use IsPow2 for mapping lock count --- zencore/iobuffer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'zencore/iobuffer.cpp') diff --git a/zencore/iobuffer.cpp b/zencore/iobuffer.cpp index ccf92da62..46b9ab336 100644 --- a/zencore/iobuffer.cpp +++ b/zencore/iobuffer.cpp @@ -227,7 +227,7 @@ IoBufferExtendedCore::~IoBufferExtendedCore() } static constexpr size_t MappingLockCount = 64; -static_assert((MappingLockCount & (MappingLockCount - 1)) == 0, "MappingLockCount must be power of two"); +static_assert(IsPow2(MappingLockCount), "MappingLockCount must be power of two"); static RwLock g_MappingLocks[MappingLockCount]; -- cgit v1.2.3