mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-12-21 10:49:14 +00:00
Format: src/{common, utils, wire}
This commit is contained in:
committed by
Corentin Wallez
parent
a351ce9618
commit
9d01c6c26d
@@ -28,14 +28,14 @@ void* AlignVoidPtr(void* ptr, size_t alignment);
|
||||
bool IsAligned(uint32_t value, size_t alignment);
|
||||
uint32_t Align(uint32_t value, size_t alignment);
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
T* AlignPtr(T* ptr, size_t alignment) {
|
||||
return reinterpret_cast<T*>(AlignVoidPtr(ptr, alignment));
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
template <typename T>
|
||||
const T* AlignPtr(const T* ptr, size_t alignment) {
|
||||
return reinterpret_cast<const T*>(AlignVoidPtr(const_cast<T*>(ptr), alignment));
|
||||
}
|
||||
|
||||
#endif // COMMON_MATH_H_
|
||||
#endif // COMMON_MATH_H_
|
||||
|
||||
Reference in New Issue
Block a user