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
Adjust a few weird clang format updates #27005
Conversation
please test |
The code-checks are being triggered in jenkins. |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27005/10065
|
The tests are being triggered in jenkins. |
A new Pull Request was created by @perrotta for master. It involves the following packages: RecoLocalMuon/GEMSegment @perrotta, @cmsbuild, @kpedro88, @slava77 can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
Le me understand: |
Well, the fixes here (that I only submitted "not to forget", since I took note of them, but I don't plan to pursue systematically) won't be reverted by a possible further run of clang tidy, since I moved the comment line somewhere else. I deliberately avoided fixing other similarly weird changes which risk to get reverted in the next run. |
float( | ||
0.01))); //temp for floating point comparision...maxEta is the difference between partitions, so x1.5 to take into account non-circle geom. | ||
return ( diff < std::max( maxETA, 0.01f)); | ||
//temp for floating point comparision...maxEta is the difference between partitions, so x1.5 to take into account non-circle geom. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a comment aligned with the code and before the action is done seems to be more common.
BTW, does the text even make sense?
temp for floating point comparision...
sounds like it's justifying whyfloat
was added in the original code- what is this "x1.5 ... " about?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BTW, does the text even make sense?
temp for floating point comparision...
sounds like it's justifying whyfloat
was added in the original code- what is this "x1.5 ... " about?
I wondered the same, but it was not my intention to inquire about it here.
As you know, even diff
here makes no se sense (as it is a difference of h1.eta()
with itself. But fixing that bug was not the scope of this PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the code was modified (float (0.01)
-> 0.01f
) and it apparently affects the content of the comment.
Comparison job queued. |
There is also a way to disable formatting for a region of code // clang-format off
...
// clang-format on |
@@ -96,8 +96,8 @@ void SiStripRecHitMatcher::match(const SiStripRecHit2D* monoRH, | |||
// position of the initial and final point of the strip in local coordinates (mono det) | |||
StripPosition stripmono = StripPosition(topol.localPosition(RPHIpointini), topol.localPosition(RPHIpointend)); | |||
|
|||
if (trackdirection.mag2() < | |||
FLT_MIN) { // in case of no track hypothesis assume a track from the origin through the center of the strip | |||
// in case of no track hypothesis assume a track from the origin through the center of the strip |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this comment be indented by two more spaces? Or did clang-format place it here?
Comparison is ready Comparison Summary:
|
The code-checks are being triggered in jenkins. |
please test |
+code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-27005/10075
|
The tests are being triggered in jenkins. |
Comparison job queued. |
Comparison is ready Comparison Summary:
|
+1
|
+upgrade |
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. @davidlange6, @slava77, @smuzaffar, @fabiocos (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
See title
No changes expected
PR validation:
It compiles