-
Notifications
You must be signed in to change notification settings - Fork 897
Warning cleanup #521
base: master
Are you sure you want to change the base?
Warning cleanup #521
Conversation
…ut hey, it for debug only
…rided, removed overrided version of Equals and merge it to base class, this commit should be reviewed
…warning (CS0675), this commit should be reviewed
… a debug code, this commit should be reviewed Additional info: After using unreachable code space suit color changed from white to red so this code was probably for debugging purposes
… empty statement" (CS0642), this commit should be reviewed
…ed to "GPU" structs or similar "fixed" size types, some was because debug code. ALSO there are few Sync<bool> (orre similar) or HashSet<> that are null but not sure its correct, should be verified, this commit should be reviewed
…g about hiding parent method (made it virtual)
Did you change random things for the sake of changing them? You didn't just remove warnings (which are there to remind devs of problems or TODOs), you made seemingly completely random modifications most of which don't have any benefit to the code. Sorry, but I highly doubt this will get merged. |
Why do you think this changes are random ? First of all, 400 warnings are not good as reminder, second, most changes are safe, warnings was there because debug code that was previously commented out. Also there are two fixes (Pack64() and planet distance calculation) in places where warnings appeared. |
I only skimmed your changes but here are a few things I noticed:
|
fixes should be posted as separate PR and properly commented, not as part of some huge PR that does other stuff and will take few workdays to review. other than that, @Jimmacle is correct. |
@Jimmacle - you say that things I change are not necessary, and yes I agree (expect probable bug fixes), but having tons of warnings also doesn't help. @Jimmacle and @mexmer - I do not agree that review is so time consuming (of course it's my opinion) @mexmer - fixes I made are part of removing warnings. And as a conclusion: I made this changes for devs, if they think they can use some of this stuff (or maybe all of it), I will be happy, if they don't, its fine, in the end this is theirs product, not mine. PS: AND I'm not teaching any one how to develop a software, do not get me wrong. |
@sebeksd, I totaly agree with you and know when you coming from. Speaking
This place needs some attitude adjustment because every second thread is On 2 May 2016 at 17:42, sebeksd [email protected] wrote:
|
I am pro fixing warnings but suppressing some by just adding the "new" keyword is not good. If overriding the base class' member/method/property was not intentional then this only hides the problem. So yes, fixing warnings is good. But be very careful with fixing warnings because it could introduce bugs, especially with things like the "new" keyword. |
@mze9412 - I agree, and this is why I marked this commit with comment that it needs a review, but still it's just one commit, if "new" is fine for devs (this code was designed this way) they can just merge it, if not they can make it better or just leave, maybe someone will propose better solution |
Be careful when fixing "volatile" keyword related warnings. Compiler says it's not treated as volatile sometimes, but removing volatile keyword caused a crash (in Parallel tasks, Fast resource lock or similar places) |
…lementation for serializable object)
@OndrejPetrzilka thank you for hint, in terms of these changes there was no "volatile" warnings. |
Yeah, I've been finding that there are a number of booby traps in the code. For example there are some variables that are not used in the code -> warning unused variable... OK.... But well they actually are used and need to be there in order for steam workshop integration to work! So yeah, be very careful.... |
@AlonzoTG if that is the case, then the warning should be suppressed explicitly, not just left as a warning for someone to assume otherwise. |
I made some warnings cleanup. Some of it was just debug code but few commits (marked in description) should be reviewed because of uncertain changes or even fixes (like Pack64).
Leaved warnings: Obsolate code, user "author" warning/TODOs, processor architecture, also all "Release" warnings about documentation.
At debug now there are around 15 warning, previously there was over 400.
Because solution builds only in 32bits I couldn't carefully check my changes (eg. out of memory).
Moreover newest source code is not building because some missing references.
Most warnings are grouped in single commits.
I hope that my changes will be useful in some way :)
All made in VS 2015.