current mscore/file.cpp

• Nov 22, 2018 - 15:26

It seems to be undergoing some changes recently, and I am at the same time merging my code with the latest master. I notice two spots in particular that seem possibly temporary in nature.
First, this printf() is temporary, right?
https://github.com/musescore/MuseScore/blob/100d297e54512c068386431c046…
And this bracketed pair of commands doesn't need braces, does it? Or is it temporary or something intentional?
https://github.com/musescore/MuseScore/blob/100d297e54512c068386431c046…
One more thing: I placed a comment about awkward variable naming in the SVG export code. It seems that the overlapping names have been changed/fixed, and the comment no longer applies. But I'm not certain, maybe there is more work to be done to complete the changes. Here is the comment, which I think can now be deleted:
https://github.com/musescore/MuseScore/blob/100d297e54512c068386431c046…


Comments

I have noticed something else that looks like a bug:
https://github.com/musescore/MuseScore/blob/100d297e54512c068386431c046…
There is no variable named "settings" anymore. It was renamed to "set", and it is scoped inside braces above this line, so it's not in scope here anyway. I don't know why this compiles, but it seems to be using a system-wide variable of some sort.
See here too:
https://github.com/musescore/MuseScore/blob/100d297e54512c068386431c046…

In reply to by sideways

The code prior to your MSVC changes is the same as my pre-merge code. The code already had the scope problem with two variables named "settings", one declared inside the braces of the if(), and the other below using the global. This is either a very old bug, or a very old feature, or a very old bug that has no negative consequences. I think you need to look into this and see what the effect is. You will understand the context much better than I. I only mess with this file for SVG exports. Or maybe @lasconic will understand it best.

Might have been me removing those overlapping variables, to fix MSVC compiler warnings. Well possible that I screwed something up in the due course, git blame or git log should show

In reply to by Jojo-Schmitz

I'm going to wait until I can debug and step the incorrect variable names, just to see what they are at run time. As you know from the mailing list, I'm in the middle of updating my build setup. Once I get it all up and running again I'll step it and submit an issue for the "settings" variables, as appropriate.

Do you still have an unanswered question? Please log in first to post your question.