shithub: orca

Download patch

ref: bfec7b24f90b80450630e40f2a83746b7b2c1c03
parent: d5aa4673d49bc348f53bc0ed9088601d041a8eb6
author: cancel <cancel@cancel.fm>
date: Sun Jan 26 01:21:33 EST 2020

Cleanup

--- a/sim.c
+++ b/sim.c
@@ -25,20 +25,13 @@
     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) {