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 a bunch of warnings #1194

Merged
merged 3 commits into from
Mar 21, 2025
Merged

fix a bunch of warnings #1194

merged 3 commits into from
Mar 21, 2025

Conversation

pca006132
Copy link
Collaborator

All of them are harmless, just some unused code. And because this doesn't involve the ugly int size_t casts, this is quite clean.

@pca006132
Copy link
Collaborator Author

will fix the build failures tmr

Copy link

codecov bot commented Mar 19, 2025

Codecov Report

Attention: Patch coverage is 86.66667% with 4 lines in your changes missing coverage. Please review.

Project coverage is 92.29%. Comparing base (4edd442) to head (6e9114b).
Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
src/boolean_result.cpp 0.00% 1 Missing ⚠️
src/csg_tree.cpp 0.00% 1 Missing ⚠️
src/face_op.cpp 80.00% 1 Missing ⚠️
src/svd.h 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1194      +/-   ##
==========================================
+ Coverage   92.09%   92.29%   +0.20%     
==========================================
  Files          31       31              
  Lines        5982     5972      -10     
==========================================
+ Hits         5509     5512       +3     
+ Misses        473      460      -13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Owner

@elalish elalish left a comment

Choose a reason for hiding this comment

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

Thanks!

src/impl.cpp Outdated
@@ -278,6 +275,8 @@ void Manifold::Impl::DedupePropVerts() {
for (int i : {0, 1, 2}) prop[i] = label2vert[vertLabels[prop[i]]];
}

constexpr int removedHalfedge = -2;
Copy link
Owner

Choose a reason for hiding this comment

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

kRemoveHalfedge?

@@ -376,6 +376,7 @@ void for_each(ExecutionPolicy policy, Iter first, Iter last, F f) {
typename std::iterator_traits<Iter>::iterator_category,
std::random_access_iterator_tag>,
"You can only parallelize RandomAccessIterator.");
(void)policy;
Copy link
Owner

Choose a reason for hiding this comment

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

What does this do?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

just to silent some warnings about unused parameters when parallelization is disabled. Not really needed though, I can remove them.

@@ -24,6 +24,10 @@
#include "manifold/manifold.h"
#include "manifold/optional_assert.h"

#ifdef MANIFOLD_DEBUG
#include <iomanip>
#endif
Copy link
Owner

Choose a reason for hiding this comment

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

I was hoping we could have a single, central place for includes guarded by MANIFOLD_DEBUG. What do you think?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good, I will see where can we do this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I will leave this in another PR later. We may want to reorganize the files a bit, I found that the file names often don't correspond to the functions inside it.

// Absolute error <= 6.7e-5
float acos(float x) {
float fastacos(float x) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This function is renamed because c++ is resolving to the C stdlib acos...

@pca006132 pca006132 merged commit 33a6941 into master Mar 21, 2025
27 checks passed
@pca006132 pca006132 deleted the fix-warnings branch March 21, 2025 06:30
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