From 340120d9209135ad8e323cb6f7ad59c17d147fb8 Mon Sep 17 00:00:00 2001 From: kayomn Date: Sat, 18 Feb 2023 20:23:03 +0000 Subject: [PATCH] Enable constexpr on core::equals --- source/core.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/core.cpp b/source/core.cpp index 4edacce..89de699 100644 --- a/source/core.cpp +++ b/source/core.cpp @@ -461,7 +461,7 @@ export namespace core { * Tests the equality of `a` against `b`, returning `true` if they contain identical bytes, * otherwise `false`. */ - bool equals(slice const & a, slice const & b) { + constexpr bool equals(slice const & a, slice const & b) { if (a.length != b.length) return false; for (size_t i = 0; i < a.length; i += 1) if (a[i] != b[i]) return false;