Skip to content

Commit

Permalink
Merge pull request #24749 from gartung/JetMETCorrections-FFTJetModule…
Browse files Browse the repository at this point in the history
…s-strictcxx17

JetMETCorrections/FFTJetModules: replace auto_ptr removed in strict implementation of std=c++17
  • Loading branch information
cmsbuild committed Oct 1, 2018
2 parents 64c9e42 + 4651c9f commit d41655d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ FFTJetCorrectorDBWriter::FFTJetCorrectorDBWriter(const edm::ParameterSet& ps)
void FFTJetCorrectorDBWriter::analyze(const edm::Event& iEvent,
const edm::EventSetup& iSetup)
{
std::auto_ptr<FFTJetCorrectorParameters> fcp;
std::unique_ptr<FFTJetCorrectorParameters> fcp;

{
std::ifstream input(inputFile.c_str(), std::ios_base::binary);
Expand All @@ -79,8 +79,7 @@ void FFTJetCorrectorDBWriter::analyze(const edm::Event& iEvent,
<< "Failed to stat file \"" << inputFile << '"' << std::endl;

const std::size_t len = st.st_size;
fcp = std::auto_ptr<FFTJetCorrectorParameters>(
new FFTJetCorrectorParameters(len));
fcp = std::make_unique<FFTJetCorrectorParameters>(len);
assert(fcp->length() == len);
if (len)
input.read(fcp->getBuffer(), len);
Expand Down

0 comments on commit d41655d

Please sign in to comment.