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

Add explicit castings to remove type warnings #68

Merged
merged 3 commits into from
Nov 5, 2024

Conversation

TimSiebert1
Copy link
Collaborator

Based on #65 I looked into the compilation and added explicit castings to remove type warnings.

@@ -143,7 +143,7 @@ int directional_active_gradient(short tag, /* trace identifier */
sum = 0;
for(i=0;i<s;i++)
{
sum += fabs(sigma_g[i]);
sum += fabs((double)sigma_g[i]);
Copy link
Contributor

@juanlucasrey juanlucasrey Nov 4, 2024

Choose a reason for hiding this comment

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

I think it's better to simply use abs here, especially since sum is also an integer

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks! I changed it

Copy link
Contributor

@juanlucasrey juanlucasrey left a comment

Choose a reason for hiding this comment

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

looks good

@TimSiebert1 TimSiebert1 merged commit 9a19766 into coin-or:master Nov 5, 2024
13 of 14 checks passed
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