From 5a4d50ab8aa09b8e2e35e73c088fedf81db2dd6c Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Wed, 5 Dec 2018 14:09:15 +1100 Subject: [PATCH 1/2] [Common] Update VS version checks to 19.16 for latest release of VS2017 (bug in VS workaround) --- common/engine/keyboardprocessor/src/keyboard.cpp | 2 +- common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/engine/keyboardprocessor/src/keyboard.cpp b/common/engine/keyboardprocessor/src/keyboard.cpp index bcc030c251..b2027d4457 100644 --- a/common/engine/keyboardprocessor/src/keyboard.cpp +++ b/common/engine/keyboardprocessor/src/keyboard.cpp @@ -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 */ std::string utf16_to_utf8(std::u16string utf16_string) { diff --git a/common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp b/common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp index 745c8791d9..05408a2761 100644 --- a/common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp +++ b/common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp @@ -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 */ std::wstring_convert, int16_t> convert; #else std::wstring_convert, 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 */ s.copy(reinterpret_cast(result), s.length()); #else s.copy(result, s.length()); From 48f6c9d411b5109be383a13d43402b1fc75f8daf Mon Sep 17 00:00:00 2001 From: Marc Durdin Date: Wed, 5 Dec 2018 14:22:50 +1100 Subject: [PATCH 2/2] [Common] Tweak comment - to trigger agents --- common/engine/keyboardprocessor/src/keyboard.cpp | 2 +- common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/engine/keyboardprocessor/src/keyboard.cpp b/common/engine/keyboardprocessor/src/keyboard.cpp index b2027d4457..0f44939992 100644 --- a/common/engine/keyboardprocessor/src/keyboard.cpp +++ b/common/engine/keyboardprocessor/src/keyboard.cpp @@ -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 <= 1916 /* VS 2017 */ +#if _MSC_VER >= 1900 /* VS 2015 */ && _MSC_VER <= 1916 /* VS 2017 19.16 */ std::string utf16_to_utf8(std::u16string utf16_string) { diff --git a/common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp b/common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp index 05408a2761..45d874315b 100644 --- a/common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp +++ b/common/engine/keyboardprocessor/src/kmx/kmx_xstring.cpp @@ -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 <= 1916 /* VS 2017 */ +#if _MSC_VER >= 1900 /* VS 2015 */ && _MSC_VER <= 1916 /* VS 2017 19.16 */ std::wstring_convert, int16_t> convert; #else std::wstring_convert, 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 <= 1916 /* VS 2017 */ +#if _MSC_VER >= 1900 /* VS 2015 */ && _MSC_VER <= 1916 /* VS 2017 19.16 */ s.copy(reinterpret_cast(result), s.length()); #else s.copy(result, s.length());