--- ray/src/rt/RcontribSimulManager.cpp 2025/10/24 18:37:05 2.18 +++ ray/src/rt/RcontribSimulManager.cpp 2025/10/25 03:30:35 2.19 @@ -1,5 +1,5 @@ #ifndef lint -static const char RCSid[] = "$Id: RcontribSimulManager.cpp,v 2.18 2025/10/24 18:37:05 greg Exp $"; +static const char RCSid[] = "$Id: RcontribSimulManager.cpp,v 2.19 2025/10/25 03:30:35 greg Exp $"; #endif /* * RcontribSimulManager.cpp @@ -414,7 +414,7 @@ RcontribSimulManager::PrepOutput() } rowsDone.NewBitMap(outList->nRows); // create row completion map rowsDone.ClearBits(0, rInPos, true); - return rInPos; + return nrDone = rInPos; } // Create header in open write-only channel @@ -534,10 +534,9 @@ RcontribOutput::CheckHeader(const RcontribSimulManager return -1; } // check #columns - if (((cp = findArgs(hdr, "NCOLS=", begData)) && atoi(cp)*esiz != rowBytes) || - !rcp->xres | (rowBytes > esiz)) { - sprintf(errmsg, "expected NCOLS=%d in '%s'", - int(rowBytes/esiz), GetName()); + if ((cp = findArgs(hdr, "NCOLS=", begData)) ? (atoi(cp)*esiz != rowBytes) + : (!rcp->xres | (rowBytes > esiz))) { + sprintf(errmsg, "expected NCOLS=%d in '%s'", int(rowBytes/esiz), GetName()); error(USER, errmsg); return -1; } @@ -579,7 +578,7 @@ RcontribSimulManager::ResetRow(int r) return false; rowsDone.ClearBits(r, rInPos-r, false); - rInPos = r; + nrDone = rInPos = r; return true; } @@ -738,11 +737,11 @@ RcontribSimulManager::UpdateRowsDone(int r) error(WARNING, "redundant call to UpdateRowsDone()"); return false; } - int nDone = GetRowFinished(); - if (nDone <= r) + GetRowFinished(); + if (nrDone <= r) return true; // nothing to update, yet for (RcontribOutput *op = outList; op; op = op->next) - if (!op->SetRowsDone(nDone)) + if (!op->SetRowsDone(nrDone)) return false; return true; // up-to-date }