Skip to content

Conversation

@qparis
Copy link
Member

@qparis qparis commented Jan 10, 2019

Follow up #790

@qparis qparis requested a review from plata January 10, 2019 20:46
if (version == null) {
regeditFileContent =
"REGEDIT4\n" +
"\n" +
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part is the same, so you could actually change the code to:

regeditFileContent =
    "REGEDIT4\n" +
    "\n" +
    "[-HKEY_CURRENT_USER\\Software\\Wine]";

if (version) {
...

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it is not if you look well

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah the "-" in front of HKEY is different. Didn't see that.

Still would prefer

if (version)

over

if (version == null)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure because if version is undefined, then, we switch back to the getter. The I think in this particular case, we really need version to be explicitely null

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. It's not so nice from an API perspective.

@qparis qparis merged commit d203e01 into PhoenicisOrg:master Jan 12, 2019
@Kreyren Kreyren mentioned this pull request Mar 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants