From b77bf5ae6be0b8c0766c2d08b983c71ed5e578ca Mon Sep 17 00:00:00 2001 From: Geod24 Date: Thu, 24 Nov 2022 15:04:39 +0100 Subject: [PATCH] Use scope const auto ref instead of in auto ref The latter is not compatible with -preview=in. --- simpledisplay.d | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simpledisplay.d b/simpledisplay.d index 4e640a5..93b622d 100644 --- a/simpledisplay.d +++ b/simpledisplay.d @@ -6557,7 +6557,7 @@ version(X11) { return modmask; } - private static uint keyEvent2KeyCode() (in auto ref KeyEvent ke) { + private static uint keyEvent2KeyCode() (scope auto ref const KeyEvent ke) { uint keycode = cast(uint)ke.key; auto dpy = XDisplayConnection.get; return XKeysymToKeycode(dpy, keycode); @@ -7525,7 +7525,7 @@ struct MouseEvent { motion (no prefix allowed) 'X' is either "up" or "down" (or "-up"/"-down"); if omited, means "down" */ - static bool equStr() (in auto ref MouseEvent event, const(char)[] str) pure nothrow @trusted @nogc { + static bool equStr() (scope auto ref const MouseEvent event, const(char)[] str) pure nothrow @trusted @nogc { if (str.length == 0) return false; // just in case debug(arsd_mevent_strcmp) { import iv.cmdcon; conwriteln("str=<", str, ">"); } enum Flag : uint { Up = 0x8000_0000U, Down = 0x4000_0000U, Any = 0x1000_0000U }