shithub: orca

Download patch

ref: 1d4937d2bd9303bb09f5e49b4bb99bc86bd53fb4
parent: 712a9c5afc6d9b965e6906e41a7f5b282ce75435
author: cancel <cancel@cancel.fm>
date: Mon Dec 3 07:10:37 EST 2018

Cleanup

--- a/sim.c
+++ b/sim.c
@@ -71,7 +71,7 @@
   return indexed_glyphs[ib == 0 ? 0 : (ia % ib)];
 }
 
-ORCA_PURE ORCA_FORCE_NO_INLINE static bool
+ORCA_PURE static bool
 oper_has_neighboring_bang(Glyph const* gbuf, Usz h, Usz w, Usz y, Usz x) {
   Glyph const* gp = gbuf + w * y + x;
   if (x < w - 1 && gp[1] == '*')
@@ -193,16 +193,16 @@
                                                 Glyph const This_oper_char) {  \
     OPER_IGNORE_COMMON_ARGS()                                                  \
     (void)cell_flags;                                                          \
-    bool const Dual_is_uppercase =                                             \
-        Orca_oper_upper_char_##_oper_name == This_oper_char;                   \
-    (void)Dual_is_uppercase;
+    (void)This_oper_char;                                                      \
+    enum { Uppercase_oper_char = Orca_oper_upper_char_##_oper_name };          \
+    (void)Uppercase_oper_char;
 #define BEGIN_DUAL_PHASE_1(_oper_name)                                         \
   OPER_PHASE_SPEC void oper_phase1_##_oper_name(OPER_PHASE_1_COMMON_ARGS,      \
                                                 Glyph const This_oper_char) {  \
     OPER_IGNORE_COMMON_ARGS()                                                  \
-    bool const Dual_is_uppercase =                                             \
-        Orca_oper_upper_char_##_oper_name == This_oper_char;                   \
-    (void)Dual_is_uppercase;
+    (void)This_oper_char;                                                      \
+    enum { Uppercase_oper_char = Orca_oper_upper_char_##_oper_name };          \
+    (void)Uppercase_oper_char;
 
 #define END_PHASE }
 
@@ -233,7 +233,7 @@
 
 #define REALIZE_DUAL                                                           \
   bool const Dual_is_active =                                                  \
-      Dual_is_uppercase ||                                                     \
+      (Uppercase_oper_char == This_oper_char) ||                               \
       oper_has_neighboring_bang(gbuffer, height, width, y, x);
 
 #define PSEUDO_DUAL bool const Dual_is_active = true