Use std::range in FWCore/Framework#49841
Conversation
|
cms-bot internal usage |
|
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49841/47492 Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
f50ab09 to
f1ac576
Compare
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49841/47493 |
|
A new Pull Request was created by @Dr15Jones for master. It involves the following packages:
@Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
|
please test |
| auto guard = makeGuard([this]() { actReg_->postPrincipalsCreationSignal_.emit(); }); | ||
| principalCache_.setNumberOfConcurrentPrincipals(preallocations_); | ||
| for (unsigned int index = 0; index < preallocations_.numberOfStreams(); ++index) { | ||
| for (auto index : std::views::iota(0UL, preallocations_.numberOfStreams())) { |
There was a problem hiding this comment.
numberOfStreams returns unsigned int, so how about
| for (auto index : std::views::iota(0UL, preallocations_.numberOfStreams())) { | |
| for (auto index : std::views::iota(0U, preallocations_.numberOfStreams())) { |
?
| for (auto const& modLabel : tmp) { | ||
| modulesOnPaths.insert(modLabel); |
There was a problem hiding this comment.
Would
| for (auto const& modLabel : tmp) { | |
| modulesOnPaths.insert(modLabel); | |
| modulesOnPaths.insert(std::ranges::begin(tmp), std::ranges::end(tmp)); |
work?
There was a problem hiding this comment.
Doesn't compile. the types returned by std::ranges::begin and std::ranges::end do not identical.
- switched to std::ranges::iota for loops needing indicies - use std::view for case where makes simpler
f1ac576 to
b595bc7
Compare
|
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-49841/47495 |
|
Pull request #49841 was updated. @Dr15Jones, @cmsbuild, @makortel, @smuzaffar can you please check and sign again. |
|
please test |
|
+1 Size: This PR adds an extra 52KB to repository The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic: You can see more details here: Comparison SummarySummary:
|
|
+core |
|
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @ftenchini, @mandrenguyen, @sextonkennedy (and backports should be raised in the release meeting by the corresponding L2) |
|
+1 |
PR description:
Not a comprehensive change, just an experiment.
PR validation:
Purely technical change. Framework unit tests pass.
resolves cms-sw/framework-team#1788