From cf7db48c261ee9c896c813a38ff8c59da5b8fe07 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Sun, 26 Jan 2025 00:40:51 +0100 Subject: Fix line endings --- asl/layout.hpp | 74 +++++++++++++++++++++++++++++----------------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'asl/layout.hpp') diff --git a/asl/layout.hpp b/asl/layout.hpp index 990af46..0201e94 100644 --- a/asl/layout.hpp +++ b/asl/layout.hpp @@ -1,37 +1,37 @@ -#pragma once - -#include "asl/integers.hpp" -#include "asl/meta.hpp" - -namespace asl -{ - -template -inline constexpr isize_t size_of = static_cast(sizeof(T)); - -template -inline constexpr isize_t align_of = static_cast(alignof(T)); - -struct layout -{ - isize_t size; - isize_t align; - - constexpr bool operator==(const layout&) const = default; - - template - static constexpr layout of() - { - return layout{ size_of, align_of }; - } - - template - static constexpr layout array(isize_t size) - { - return layout{ size_of * size, align_of }; - } -}; - -} // namespace asl - -#define AslOffsetOf(S, M) (static_cast(__builtin_offsetof(S, M))) +#pragma once + +#include "asl/integers.hpp" +#include "asl/meta.hpp" + +namespace asl +{ + +template +inline constexpr isize_t size_of = static_cast(sizeof(T)); + +template +inline constexpr isize_t align_of = static_cast(alignof(T)); + +struct layout +{ + isize_t size; + isize_t align; + + constexpr bool operator==(const layout&) const = default; + + template + static constexpr layout of() + { + return layout{ size_of, align_of }; + } + + template + static constexpr layout array(isize_t size) + { + return layout{ size_of * size, align_of }; + } +}; + +} // namespace asl + +#define AslOffsetOf(S, M) (static_cast(__builtin_offsetof(S, M))) -- cgit