Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use move semantics to push TrajectorySeeds into a vector #3693

Merged
merged 1 commit into from May 7, 2014
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -159,7 +159,7 @@ void SeedFromConsecutiveHitsCreator::buildSeed(
PTrajectoryStateOnDet const & PTraj =
trajectoryStateTransform::persistentState(updatedState, hit->geographicalId().rawId());
TrajectorySeed seed(PTraj,std::move(seedHits),alongMomentum);
if ( !filter || filter->compatible(seed)) seedCollection.push_back(seed);
if ( !filter || filter->compatible(seed)) seedCollection.push_back(std::move(seed));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a different solution could be
seedCollection.emplace_back(PTraj,std::move(seedHits),alongMomentum);
if (filter && (!filter->compatible(seedCollection.back()) seedCollection.pop_back();
in particular if compatible is very likely


}

Expand Down