-
Notifications
You must be signed in to change notification settings - Fork 116
Change SPGCONST
to const
#258
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
Conversation
Codecov ReportPatch coverage:
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## develop #258 +/- ##
===========================================
+ Coverage 85.69% 85.72% +0.02%
===========================================
Files 23 23
Lines 6069 6079 +10
===========================================
+ Hits 5201 5211 +10
Misses 868 868
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
|
Oh, it is supposed to be the other way around, I'll test to see what warning it throws |
It is something like "incompatible pointer type". I'm sorry for badly written codes. Spglib code was maintained almost alone for long time, so it was enough if I understand it. But now I should explain more about details. |
Ok, this one is an issue: spglib/src/magnetic_spacegroup.c Line 257 in 1d17e5e
But it call mat_inverse_matrix_d3 which changes it:spglib/src/magnetic_spacegroup.c Line 452 in 1d17e5e
Line 268 in 1d17e5e
So it is indeed an implementation error that should be fixed. I.e. copy it if you want to edit it. |
Lines 268 to 289 in 1d17e5e
You don't need to save to a temporary array c here. The intent of m is always to be overwritten, and you don't use it anywhere else.
I think most of these issues can be resolved, it just needs a bit of working through to detangle the intents. Some doxygen comments would help, even if it is internal. Just what are each argument meant to be. Oh, you're allowing for operations on the same pointer like |
7dcdd5c
to
5882ecd
Compare
Note that there are a lot of redundant Anyway, there were only 4 spots that needed fixing, excluding the thousands of meaningless |
Indeed! I tend to use |
This can happen. So I think it is safe to write in this way, but I don't mean this is the best way. |
Indeed. To be honest I don't know of an elegant way to do it without C++ templates, and otherwise if the non-copy is worth it for a 3x3 matrix. I would do it on my codes just for the designing exercise |
Rminder: if we merge #257 I need to add some words there. With regards to versioning, I don't think it is that severe since there was an indication of the intent, we just might have allowed people to shoot themselves in the foot. I don't think we need to increase a major just for this. As long as the bindings are correctly configured also |
5882ecd
to
6c0850a
Compare
Should be `const` Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
Signed-off-by: Cristian Le <cristian.le@mpsd.mpg.de>
6c0850a
to
493eeea
Compare
We should merge this soon, the const is not enforced in the current state. |
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.
Great. Thanks @LecrisUT!
I think this is no longer necessary