diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-02-19 21:22:20 +0100 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2023-02-19 21:38:28 +0100 |
commit | 920409e9149f99e894eb2e3bcd316e51a65e1bde (patch) | |
tree | 49e29313a3abf2174bad4e4ba082fa447d2d2599 /resources | |
parent | Automatically fetch keys for undecrypted messages after verification (diff) | |
download | nheko-920409e9149f99e894eb2e3bcd316e51a65e1bde.tar.xz |
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.
Diffstat (limited to 'resources')
-rw-r--r-- | resources/provider-header.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/resources/provider-header.txt b/resources/provider-header.txt index c947eec4..5cc22e76 100644 --- a/resources/provider-header.txt +++ b/resources/provider-header.txt @@ -7,4 +7,12 @@ 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); +} + |