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

Fix compiler warnings related to lossy conversion and new name for ROOTWriter #46

Merged
merged 3 commits into from
Feb 7, 2024

Conversation

jmcarcell
Copy link
Member

@jmcarcell jmcarcell commented Jan 27, 2024

BEGINRELEASENOTES

ENDRELEASENOTES

They seem to appear only with clang 16 but not with gcc

@@ -100,8 +100,8 @@ namespace LCIO2EDM4hepConv {
lval.setColorFlow(edm4hep::Vector2i(rval->getColorFlow()));
lval.setVertex(edm4hep::Vector3d(rval->getVertex()));
lval.setEndpoint(edm4hep::Vector3d(rval->getEndpoint()));
lval.setMomentum(Vector3fFrom(rval->getMomentum()));
lval.setMomentumAtEndpoint(Vector3fFrom(rval->getMomentumAtEndpoint()));
lval.setMomentum(rval->getMomentum());
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we also remove the Vector3fFrom now, or is that still in use in other places?

Copy link
Member Author

Choose a reason for hiding this comment

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

I saw it in use in another place so I didn't remove it

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, it looks like there are more overloads. I think this one should be removable now:

inline edm4hep::Vector3f Vector3fFrom(const double* v) { return edm4hep::Vector3f(v[0], v[1], v[2]); }

Copy link
Contributor

Choose a reason for hiding this comment

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

It is actually not due to key4hep/EDM4hep#265

@tmadlener tmadlener changed the title Fix compiler warnings related to double - float Fix compiler warnings related to lossy conversion and new name for ROOTWriter Feb 6, 2024
Copy link
Contributor

@tmadlener tmadlener left a comment

Choose a reason for hiding this comment

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

I will merge tomorrow, unless you want to add something here still.

@tmadlener tmadlener merged commit c4e9c76 into main Feb 7, 2024
7 of 13 checks passed
@tmadlener tmadlener deleted the warnings branch February 7, 2024 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants