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 compiler warnings and MinGW build #4082
Conversation
3992d84
to
3eab271
Compare
@@ -218,7 +218,6 @@ | |||
// Undefined problematic #def'd macros in Microsoft headers | |||
#undef STRING_NONE | |||
#undef small | |||
#undef DELETE |
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.
moved directly to where it is really needed...
@@ -36,7 +36,7 @@ enum class ItemType { | |||
//--------------------------------------------------------- | |||
// DiffType | |||
//--------------------------------------------------------- | |||
|
|||
#undef DELETE |
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.
Needed not just for MSVC, but also for MinGW, and as thirdparty/diff_match_patch unconditionally #undef
's it , we're doing it here too.
This actually doesn't fix a compiler warning. but a hard build error, with MinGW.
3eab271
to
0d033d8
Compare
mscore/scorecmp/scorecmp.cpp
Outdated
@@ -240,7 +240,7 @@ void ScoreComparisonTool::updateDiff() | |||
|
|||
Score* ScoreComparisonTool::openScoreVersion(const ScoreVersion& ver) | |||
{ | |||
Score* s; | |||
Score* s = 0; |
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.
nullptr
is more effective.
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.
Well, AFAIK its the same thing to C/C++ and less to type. And on the occasions where I did use nullptr
, it didn't pass review ;-)
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.
but as you want it: here we go
0d033d8
to
1923dd6
Compare
No description provided.