-
Notifications
You must be signed in to change notification settings - Fork 759
odb: fix 3dblox declaration mismatches #9179
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
odb: fix 3dblox declaration mismatches #9179
Conversation
Some structs in src/odb/include/odb/3dblox.h where forward declared as classes. Which errored with "-Wmismatched-tags" compiler flag. Also, found another mismatch in PartitionMgr.h Note that C++ does not distinguish between class and struct in a forward declaration. Only MSVC can have issues with it. Signed-off-by: Ahmed R. Mohamed <[email protected]>
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.
Code Review
This pull request correctly fixes mismatched forward declarations of structs that were declared as class, which resolves -Wmismatched-tags compiler warnings. The changes in src/odb/include/odb/3dblox.h and src/par/include/par/PartitionMgr.h are accurate and improve code correctness by ensuring consistency between declarations and definitions. The grouping of struct forward declarations in 3dblox.h also slightly improves readability. The changes look good to me.
|
clang-tidy review says "All clean, LGTM! 👍" |
|
Apparently it matters on mac as well which doesn't use MSVC. |
OK I'll add it to compile options for clang then. |
Signed-off-by: Ahmed R. Mohamed <[email protected]>
|
clang-tidy review says "All clean, LGTM! 👍" |
Quote by @maliberty |
Some structs in src/odb/include/odb/3dblox.h where forward declared as classes. Which errored with "-Wmismatched-tags" compiler flag. Also, found another mismatch in PartitionMgr.h
Note that C++ does not distinguish between class and struct in a forward declaration. Only MSVC can have issues with it.