From bfec7b24f90b80450630e40f2a83746b7b2c1c03 Mon Sep 17 00:00:00 2001 From: cancel Date: Sun, 26 Jan 2020 06:21:33 +0900 Subject: [PATCH] Cleanup --- sim.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/sim.c b/sim.c index e9f1b6e..4c0e650 100644 --- a/sim.c +++ b/sim.c @@ -25,20 +25,13 @@ static U8 const index_table[128] = { 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 0, 0, 0, 0, 0}; // 112-127 static ORCA_FORCEINLINE Usz index_of(Glyph c) { return index_table[c & 0x7f]; } -#if 0 -// Reference implementation -static Usz index_of(Glyph c) { - if (c == '.' || c == '*') - return 0; - if (c >= '0' && c <= '9') - return (Usz)(c - '0'); - if (c >= 'A' && c <= 'Z') - return (Usz)(c - 'A' + 10); - if (c >= 'a' && c <= 'z') - return (Usz)(c - 'a' + 10); - return 0; -} -#endif +// Reference implementation: +// static Usz index_of(Glyph c) { +// if (c >= '0' && c <= '9') return (Usz)(c - '0'); +// if (c >= 'A' && c <= 'Z') return (Usz)(c - 'A' + 10); +// if (c >= 'a' && c <= 'z') return (Usz)(c - 'a' + 10); +// return 0; +// } static inline bool glyph_is_lowercase(Glyph g) { return g & (1 << 5); } static inline Glyph glyph_lowered_unsafe(Glyph g) {