matrixion/resources/provider-header.txt
Nicolas Werner 920409e914
Reduce code bloat a bit
Especially the emoji array shrinks a lot with this, but adds a few extra
relocations on startup. But it removes a lot of exception handling code
at runtime, which is nice and possibly this is still faster.
2023-02-19 21:38:28 +01:00

18 lines
378 B
Text

// SPDX-FileCopyrightText: 2021 Nheko Contributors
// SPDX-FileCopyrightText: 2022 Nheko Contributors
//
// SPDX-License-Identifier: GPL-3.0-or-later
#include "emoji/Provider.h"
using namespace emoji;
// a null terminated string_view
template<size_t N>
static consteval std::u16string_view
null_literal(const char16_t (&lit)[N])
{
return std::u16string_view(lit, N);
}