summaryrefslogtreecommitdiff
path: root/src/simd
diff options
context:
space:
mode:
authorMitchell Hashimoto <mitchell.hashimoto@gmail.com>2024-02-07 09:28:56 -0800
committerMitchell Hashimoto <mitchell.hashimoto@gmail.com>2024-02-07 09:28:56 -0800
commit3c31217f3cf66950e638f59f421beb40453e247f (patch)
tree3244fbbb1fef567c0cb3400d0b29896950c9a484 /src/simd
parent46a887578ae996c9b551e8d0b4898273ac298010 (diff)
simd: minor tweaks
Diffstat (limited to 'src/simd')
-rw-r--r--src/simd/codepoint_width.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/simd/codepoint_width.cpp b/src/simd/codepoint_width.cpp
index 5481d90c7..795eb4a92 100644
--- a/src/simd/codepoint_width.cpp
+++ b/src/simd/codepoint_width.cpp
@@ -211,11 +211,11 @@ int8_t CodepointWidthImpl(D d, T input) {
//
// NOTE: 0x2E3B is technically width 3 but for our terminal we only
// handle up to width 2 as wide so we will treat it as width 2.
- HWY_ALIGN T gte_keys[] = {
+ HWY_ALIGN constexpr T gte_keys[] = {
0x2E3A, 0x1f1e6, 0x3400, 0x4E00, 0xF900, 0x20000, 0x30000, 0x2E3B,
0, 0, 0, 0, 0, 0, 0, 0,
};
- HWY_ALIGN T lte_keys[] = {
+ HWY_ALIGN constexpr T lte_keys[] = {
0x2E3A, 0x1f1ff, 0x4DBF, 0x9FFF, 0xFAFF, 0x2FFFD, 0x3FFFD, 0x2E3B,
0, 0, 0, 0, 0, 0, 0, 0,
};
@@ -234,10 +234,10 @@ int8_t CodepointWidthImpl(D d, T input) {
{
// Definitely width 0
- HWY_ALIGN T gte_keys[] = {
+ HWY_ALIGN constexpr T gte_keys[] = {
0x1160, 0x2060, 0xFFF0, 0xE0000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
- HWY_ALIGN T lte_keys[] = {
+ HWY_ALIGN constexpr T lte_keys[] = {
0x11FF, 0x206F, 0xFFF8, 0xE0FFF, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
};
size_t i = 0;