[vte/wip/mosaic: 31/35] draw: Use binary notation for some constants



commit 02ddcd01f80a91f684d690d8fd13d98929ff70b2
Author: Christian Persch <chpe src gnome org>
Date:   Mon Nov 18 23:26:55 2019 +0100

    draw: Use binary notation for some constants

 src/vtedraw.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/vtedraw.cc b/src/vtedraw.cc
index 8542c5fb..d657f286 100644
--- a/src/vtedraw.cc
+++ b/src/vtedraw.cc
@@ -2137,7 +2137,8 @@ _vte_draw_terminal_draw_graphic(struct _vte_draw *draw,
         case 0x1fbae:
         {
                 const int v = c - 0x1fba0;
-                const int map[15] = { 1, 2, 4, 8, 5, 10, 12, 3, 9, 6, 14, 13, 11, 7, 15 };
+                const int map[15] = { 0b0001, 0b0010, 0b0100, 0b1000, 0b0101, 0b1010, 0b1100, 0b0011,
+                                      0b1001, 0b0110, 0b1110, 0b1101, 0b1011, 0b0111, 0b1111 };
                 cairo_set_line_cap(cr, CAIRO_LINE_CAP_ROUND);
                 cairo_set_line_width(cr, light_line_width);
                 adjust = light_line_width / 2.;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]