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

Fixing compiler warning in win.cc #295

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

cwhelms
Copy link

@cwhelms cwhelms commented Dec 22, 2023

The converstion from a wstring to std::string gave a warning:
C4244: 'argument': conversion from 'const wchar_t' to 'const _Elem', possible loss of data.

Conversion used to be recommended with codecvt, but that has been deprecated, so a transform here is simplest I think.

For reference on the options:
https://stackoverflow.com/questions/4804298/how-to-convert-wstring-into-string/12097772#12097772

The converstion from a wstring to std::string gave a
warning C4244: 'argument': conversion from 'const wchar_t' to 'const _Elem', possible loss of data.
@cwhelms cwhelms changed the title Fixing comiler warning in win.cc Fixing compiler warning in win.cc Mar 22, 2024
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.

1 participant