aboutsummaryrefslogtreecommitdiffstats
path: root/testing/tilix/ce11b0bd936fe8fee9c5ac7025ea5864b99ed7d3.patch
blob: b0952df26f52fe57e86d5be512f986ba9a6e8c39 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
From ce11b0bd936fe8fee9c5ac7025ea5864b99ed7d3 Mon Sep 17 00:00:00 2001
From: LuK1337 <priv.luk@gmail.com>
Date: Mon, 15 Jul 2019 20:42:21 +0200
Subject: [PATCH] Avoid calling `values()` on a shared object

* This fixes a compilation on dmd v2.087.0+ ( I think? )
  /usr/include/dmd/druntime/import/object.d(3453,36): Error: cannot implicitly convert expression aa of type shared(ProcessStatus[int]) to const(shared(ProcessStatus)[int])
  source/gx/tilix/terminal/monitor.d(46,46): Error: template instance `object.values!(shared(ProcessStatus[int]), shared(ProcessStatus), int)` error instantiating
---
 source/gx/tilix/terminal/monitor.d | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/source/gx/tilix/terminal/monitor.d b/source/gx/tilix/terminal/monitor.d
index 2b130efe..affc4b86 100644
--- a/source/gx/tilix/terminal/monitor.d
+++ b/source/gx/tilix/terminal/monitor.d
@@ -43,7 +43,7 @@ private:
 
     bool fireEvents() {
         synchronized {
-            foreach(process; processes.values()) {
+            foreach(process; processes) {
                 if (process.eventType != MonitorEventType.NONE) {
                     onChildProcess.emit(process.eventType, process.gpid, process.activePid, process.activeName);
                     process.eventType = MonitorEventType.NONE;
@@ -138,7 +138,7 @@ void monitorProcesses(int sleep, Tid tid) {
             // all open terminals. We need to get these using shell
             // PID and will store them to raise events for each terminal.
             auto activeProcesses = getActiveProcessList();
-            foreach(process; processes.values()) {
+            foreach(process; processes) {
                 auto activeProcess  = activeProcesses.get(process.gpid, null);
                 // No need to raise event for same process.
                 if (activeProcess !is null && activeProcess.pid != process.activePid) {