From f3ba19b162a89b2081c0598b4a0bf126146e3671 Mon Sep 17 00:00:00 2001 From: Steven Le Rouzic Date: Thu, 4 Apr 2024 22:05:06 +0200 Subject: Add logging system --- deimos/core/base.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'deimos/core/base.h') diff --git a/deimos/core/base.h b/deimos/core/base.h index 21cad3d..4bcb7c7 100644 --- a/deimos/core/base.h +++ b/deimos/core/base.h @@ -53,6 +53,14 @@ struct SourceLocation {} }; +template T Min(T a, T b) { return (a < b) ? a : b; } +template T Max(T a, T b) { return (a > b) ? a : b; } + +constexpr void MemoryCopy(void* dst, const void* src, int64_t size) +{ + __builtin_memcpy(dst, src, (size_t)size); +} + template class Span { @@ -79,7 +87,7 @@ public: template requires std::convertible_to - constexpr Span(const Span& other) : // NOLINT + constexpr Span(const Span& other) : // NOLINT(*-explicit-conversions) m_begin{other.begin()}, m_size{other.size()} {} -- cgit