X-Git-Url: http://git.kpe.io/?p=ctsim.git;a=blobdiff_plain;f=src%2Fthreadraster.cpp;h=736bf90b71d1606ec044281b08fcef3c6873ce45;hp=f1678ce613d79b0dd92416426e8d9e3f43b5b411;hb=fbe99ce7041eb409981b1fd8e269827daf4ed168;hpb=d77c9d135405e077047ef3426a54470c144cdd34 diff --git a/src/threadraster.cpp b/src/threadraster.cpp index f1678ce..736bf90 100644 --- a/src/threadraster.cpp +++ b/src/threadraster.cpp @@ -9,7 +9,7 @@ ** This is part of the CTSim program ** Copyright (C) 1983-2001 Kevin Rosenberg ** -** $Id: threadraster.cpp,v 1.9 2001/03/05 17:26:46 kevin Exp $ +** $Id: threadraster.cpp,v 1.10 2001/03/05 19:14:40 kevin Exp $ ** ** This program is free software; you can redistribute it and/or modify ** it under the terms of the GNU General Public License (version 2) as @@ -65,28 +65,28 @@ RasterizerSupervisorThread::RasterizerSupervisorThread (PhantomFileView* pProjVi wxThread::ExitCode RasterizerSupervisorThread::Entry() { - RasterizerSupervisor* pRasterSupervisor = new RasterizerSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel.c_str()); + RasterizerSupervisor rasterSupervisor (this, m_pPhantomView, m_iNX, m_iNY, m_iNSample, m_dViewRatio, m_strLabel.c_str()); - pRasterSupervisor->start(); + rasterSupervisor.start(); - while (! pRasterSupervisor->workersDone() && ! pRasterSupervisor->fail() && ! pRasterSupervisor->cancelled()) { + while (! rasterSupervisor.workersDone() && ! rasterSupervisor.fail() && ! rasterSupervisor.cancelled()) { Sleep(100); } - if (pRasterSupervisor->fail()) + if (rasterSupervisor.fail()) { wxString msg ("Error starting Rasterizer supervisor: "); - msg += pRasterSupervisor->getFailMessage().c_str(); + msg += rasterSupervisor.getFailMessage().c_str(); msg += "\n"; wxCommandEvent eventLog (wxEVT_COMMAND_MENU_SELECTED, MAINMENU_LOG_EVENT ); eventLog.SetString( msg ); wxPostEvent( theApp->getMainFrame(), eventLog ); // send log event } - if (! pRasterSupervisor->cancelled()) - pRasterSupervisor->onDone(); - pRasterSupervisor->deleteWorkers(); - + if (! rasterSupervisor.cancelled()) + rasterSupervisor.onDone(); + rasterSupervisor.deleteWorkers(); + return reinterpret_cast(0); }