# HG changeset patch # User Matti Hamalainen # Date 1535023648 -10800 # Node ID 74e1616ca38e3e2912b79391e519ab23179309e6 # Parent b4e8b8c1c3e38038ee3f384280de4f5fdeca3401 Micro-optimize draw(). diff -r b4e8b8c1c3e3 -r 74e1616ca38e multipaint.pde --- a/multipaint.pde Thu Aug 23 14:22:36 2018 +0300 +++ b/multipaint.pde Thu Aug 23 14:27:28 2018 +0300 @@ -598,7 +598,8 @@ // Tool drawing for shows int savebut = g_button; - if (tool() != 5) + int tt = tool(); + if (tt != 5) { if (g_phase == 0) g_button = LEFT; @@ -607,9 +608,9 @@ else storecoords(g_mx, g_my); - if (tool() == 6) do_line(g_rx, g_ry, g_rx2, g_ry2, 0); - if (tool() == 7) do_circle(g_rx, g_ry, g_rx2, g_ry2); - if (tool() == 8) do_rectangle(g_rx, g_ry, g_rx2, g_ry2); + if (tt == 6) do_line(g_rx, g_ry, g_rx2, g_ry2, 0); + if (tt == 7) do_circle(g_rx, g_ry, g_rx2, g_ry2); + if (tt == 8) do_rectangle(g_rx, g_ry, g_rx2, g_ry2); g_button = savebut; // Screen update stuff