Skip to content
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

WIN32: No need to use strlen() into MultiByteToWideChar() #146

Merged
merged 1 commit into from
Dec 2, 2023

Conversation

carlo-bramini
Copy link
Contributor

The call to strlen() can be removed because MultiByteToWideChar() already calculates its value if the parameter is -1.
See here:
https://learn.microsoft.com/en-us/windows/win32/api/stringapiset/nf-stringapiset-multibytetowidechar

immagine

Since the entire source is using spaces but this piece of code uses hardware tabs, I also adjusted this.

The call to strlen() can be removed because MultiByteToWideChar() already calculates its value if the parameter is -1.
Since the entire source is using spaces but this piece of code uses hardware tabs, I also adjusted this.
@JohannesLorenz
Copy link
Collaborator

Thanks for your efforts. LGTM.

@JohannesLorenz JohannesLorenz merged commit 96eb2f3 into radarsat1:master Dec 2, 2023
2 of 3 checks passed
@carlo-bramini carlo-bramini deleted the fix_windows_1 branch December 3, 2023 11:04
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.

None yet

2 participants