Skip to content

Commit

Permalink
Return the unique_ptr directly.
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed Feb 10, 2018
1 parent 71d9263 commit 4f2a5b0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 12 deletions.
Expand Up @@ -115,9 +115,7 @@ class ES_TTClusterAlgorithm_neighbor : public edm::ESProducer
TTClusterAlgorithm< T >* TTClusterAlgo =
new TTClusterAlgorithm_neighbor< T >( );

std::unique_ptr< TTClusterAlgorithm< T > > _theAlgo;
_theAlgo = std::unique_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo );
return _theAlgo;
return std::unique_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo );
}

}; /// Close class
Expand Down
Expand Up @@ -110,9 +110,7 @@ class ES_TTClusterAlgorithm_official: public edm::ESProducer
TTClusterAlgorithm< T >* TTClusterAlgo =
new TTClusterAlgorithm_official< T >( mWidthCut );

std::unique_ptr< TTClusterAlgorithm< T > > _theAlgo;
_theAlgo = std::unique_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo );
return _theAlgo;
return std::unique_ptr< TTClusterAlgorithm< T > >( TTClusterAlgo );
}

}; /// Close class
Expand Down
4 changes: 1 addition & 3 deletions L1Trigger/TrackTrigger/interface/TTStubAlgorithm_cbc3.h
Expand Up @@ -111,9 +111,7 @@ class ES_TTStubAlgorithm_cbc3 : public edm::ESProducer
const TrackerTopology* const theTrackerTopo = tTopoHandle.product();

TTStubAlgorithm< T >* TTStubAlgo = new TTStubAlgorithm_cbc3< T >( theTrackerGeom, theTrackerTopo, mPerformZMatching2S );
std::unique_ptr< TTStubAlgorithm< T > > _theAlgo;
_theAlgo = std::unique_ptr< TTStubAlgorithm< T > >( TTStubAlgo );
return _theAlgo;
return std::unique_ptr< TTStubAlgorithm< T > >( TTStubAlgo );
}

};
Expand Down
4 changes: 1 addition & 3 deletions L1Trigger/TrackTrigger/interface/TTStubAlgorithm_official.h
Expand Up @@ -171,9 +171,7 @@ class ES_TTStubAlgorithm_official : public edm::ESProducer
setBarrelCut, setRingCut, setTiltedCut, setBarrelNTilt,
mPerformZMatchingPS, mPerformZMatching2S);

std::unique_ptr< TTStubAlgorithm< T > > _theAlgo;
_theAlgo = std::unique_ptr< TTStubAlgorithm< T > >( TTStubAlgo );
return _theAlgo;
return std::unique_ptr< TTStubAlgorithm< T > >( TTStubAlgo );
}

};
Expand Down

0 comments on commit 4f2a5b0

Please sign in to comment.