From 964f329c0a589d7a0616985c49552525f146bcb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Krupi=C5=84ski?= Date: Mon, 20 Sep 2021 20:38:53 +0200 Subject: [PATCH] Remove unused static functions * NextPow2() * PrevPow2() * StrIsEmpty() --- src/D3D12MemAlloc.cpp | 53 ------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/src/D3D12MemAlloc.cpp b/src/D3D12MemAlloc.cpp index 8aaaf91..f450dc1 100644 --- a/src/D3D12MemAlloc.cpp +++ b/src/D3D12MemAlloc.cpp @@ -278,59 +278,6 @@ static inline T DivideRoudingUp(T x, T y) return (x + y - 1) / y; } -// Returns smallest power of 2 greater or equal to v. -static inline UINT NextPow2(UINT v) -{ - v--; - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - v++; - return v; -} -static inline uint64_t NextPow2(uint64_t v) -{ - v--; - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - v |= v >> 32; - v++; - return v; -} - -// Returns largest power of 2 less or equal to v. -static inline UINT PrevPow2(UINT v) -{ - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - v = v ^ (v >> 1); - return v; -} -static inline uint64_t PrevPow2(uint64_t v) -{ - v |= v >> 1; - v |= v >> 2; - v |= v >> 4; - v |= v >> 8; - v |= v >> 16; - v |= v >> 32; - v = v ^ (v >> 1); - return v; -} - -static inline bool StrIsEmpty(const char* pStr) -{ - return pStr == NULL || *pStr == '\0'; -} - // Helper RAII class to lock a mutex in constructor and unlock it in destructor (at the end of scope). struct MutexLock {