change asserts to not throw clang warnings#181
Conversation
There was a problem hiding this comment.
Pull request overview
This PR addresses clang compiler warnings on Mac by reformatting assert statements to use the standard C++ idiom assert(condition && "message") instead of the non-standard assert(("message", condition)) format. The PR also adds a default: case to an enum switch statement in BiorthBasis.cc to suppress another warning.
- Reformatted 8 assert statements in CoefStruct.cc to use proper syntax
- Added default case to DiskType enum switch statement
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| expui/CoefStruct.cc | Reformatted all assert statements in deepcopy methods to use assert(condition && "message") format, eliminating clang warnings |
| expui/BiorthBasis.cc | Added default: case to switch statement for DiskType enum to address compiler warning (introduces logic bug) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
The9Cat
left a comment
There was a problem hiding this comment.
Seems fine to me overall. I'll try to remember not to use the comma operator in asserts but, tbh, I have no idea why this is wrong. Seems like valid C++ to me.
…king; the request is _on_ by default and is _off_ for non-biorthogonal field classes.
|
The use of a virtual member function rather than a base-class variable will allow more complex |
|
I've run all the |
|
I will check |
|
The Zang-disk velocity field example in Probably should add those notebooks to the repo soonish so other can test. I suppose I was shying away from adding more PRs, but these should be there, I think. Separate issue: Docker images seem fine. |
|
Fixed the velocity field issue. I had changed the call signature to match those of the other I'm going to make a branch with a PR in |
This PR changes some
asserts such that they don't throw clang warnings on Mac. It also adds a default to oneenum, which was throwing another warning.