serial icon indicating copy to clipboard operation
serial copied to clipboard

Fixing compiler warning in win.cc

Open cwhelms opened this issue 2 years ago • 0 comments

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

cwhelms avatar Dec 22 '23 18:12 cwhelms