Skip to content
Snippets Groups Projects
Commit 88bf3cbb authored by scott snyder's avatar scott snyder Committed by scott snyder
Browse files

GeneratorObjects: Fix cppcheck warnings.

 - Prefer preincrement to postincrement for iterators.
parent 841c4ce8
No related branches found
No related tags found
No related merge requests found
/*
Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
*/
#ifndef GENERATOROBJECTSMCEVENTCOLLECTION_H
......@@ -62,10 +62,9 @@ inline McEventCollection& McEventCollection::operator=(const McEventCollection&
{
// Force a deep copy on the DataVector
//
for (EventConstIterator iter = in.begin();
iter != in.end(); iter++)
for (const HepMC::GenEvent* ev : in)
{
DataVector<HepMC::GenEvent>::push_back(new HepMC::GenEvent(**iter));
DataVector<HepMC::GenEvent>::push_back(new HepMC::GenEvent(*ev));
}
return *this;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment