From 27b730124ed9f90809fd8313b9efc675fcbff4ef Mon Sep 17 00:00:00 2001 From: "Gregory J. Ward" Date: Tue, 19 Nov 2024 20:50:36 +0000 Subject: [PATCH] fix: Improved last change for case of same callback with different data --- src/rt/RtraceSimulManager.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/rt/RtraceSimulManager.h b/src/rt/RtraceSimulManager.h index 8e50550e..22fcc2a7 100644 --- a/src/rt/RtraceSimulManager.h +++ b/src/rt/RtraceSimulManager.h @@ -1,4 +1,4 @@ -/* RCSid $Id: RtraceSimulManager.h,v 2.18 2024/11/19 20:39:40 greg Exp $ */ +/* RCSid $Id: RtraceSimulManager.h,v 2.19 2024/11/19 20:50:36 greg Exp $ */ /* * RtraceSimulManager.h * @@ -140,10 +140,7 @@ class RtraceSimulManager : public RadSimulManager { } /// Set/change trace callback void SetTraceCall(RayReportCall *cb, void *cd = NULL) { - if (cb == traceCall) { - if (cb) tcData = cd; - return; - } + if ((cb == traceCall) & (cd == tcData)) return; int nt = NThreads(); if (nt > 1) SetThreadCount(1); traceCall = cb;