mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-13 12:19:25 +00:00
Merge pull request #1384 from keymanapp/common-msvc-update-to-1916
[Common] Update VS version checks to 19.16 for latest release of VS2017 (bug in VS workaround)
This commit is contained in:
commit
8d0f85b7dd
2 changed files with 3 additions and 3 deletions
|
|
@ -56,7 +56,7 @@ json & km::kbp::operator << (json & j, km::kbp::keyboard const & kb)
|
|||
https://stackoverflow.com/a/35103224/1836776
|
||||
*/
|
||||
|
||||
#if _MSC_VER >= 1900 /* VS 2015 */ && _MSC_VER <= 1915 /* VS 2017 */
|
||||
#if _MSC_VER >= 1900 /* VS 2015 */ && _MSC_VER <= 1916 /* VS 2017 19.16 */
|
||||
|
||||
std::string utf16_to_utf8(std::u16string utf16_string)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -229,14 +229,14 @@ PKMX_WCHAR km::kbp::kmx::strtowstr(PKMX_CHAR in)
|
|||
{
|
||||
km_kbp_cp *result;
|
||||
|
||||
#if _MSC_VER >= 1900 /* VS 2015 */ && _MSC_VER <= 1915 /* VS 2017 */
|
||||
#if _MSC_VER >= 1900 /* VS 2015 */ && _MSC_VER <= 1916 /* VS 2017 19.16 */
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<int16_t>, int16_t> convert;
|
||||
#else
|
||||
std::wstring_convert<std::codecvt_utf8_utf16<char16_t>, char16_t> convert;
|
||||
#endif
|
||||
auto s = convert.from_bytes(in, strchr(in, 0));
|
||||
result = new KMX_WCHAR[s.length() + 1];
|
||||
#if _MSC_VER >= 1900 /* VS 2015 */ && _MSC_VER <= 1915 /* VS 2017 */
|
||||
#if _MSC_VER >= 1900 /* VS 2015 */ && _MSC_VER <= 1916 /* VS 2017 19.16 */
|
||||
s.copy(reinterpret_cast<int16_t *>(result), s.length());
|
||||
#else
|
||||
s.copy(result, s.length());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue