Skip to content

Commit

Permalink
refs #8095 use reset instead of = to free the shared pointer
Browse files Browse the repository at this point in the history
in the expression written to avoid MAC hung-up problem
  • Loading branch information
abuts committed Oct 11, 2013
1 parent b5bca48 commit 870f1fb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions Code/Mantid/Framework/DataHandling/src/FindDetectorsPar.cpp
Expand Up @@ -154,12 +154,14 @@ void FindDetectorsPar::exec()
try
{
spDet= inputWS->getDetector(i);
}catch(Kernel::Exception::NotFoundError &){
spDet = Geometry::IDetector_const_sptr();
}
// avoid MAC problem
catch(Kernel::Exception::NotFoundError &)
{// Intel compilers on MAC hungs on continue here
// should be no problem with this if get detector implemented properly and workspace keeps ownership for the detector (I expet so)
spDet.reset();

This comment has been minimized.

Copy link
@RussellTaylor

RussellTaylor Oct 11, 2013

Contributor

This line is redundant. The shared_ptr will be empty/null on construction and will remain so if line 156 throws.

}
// separate check as some compilers do not obey the standard evaluation order
if (!spDet)continue;

// Check that we aren't writing a monitor...
if (spDet->isMonitor())continue;

Expand Down

0 comments on commit 870f1fb

Please sign in to comment.