mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-24 20:18:53 +03:00
920409e914
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.
18 lines
378 B
Text
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);
|
|
}
|
|
|
|
|