Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame^] | 1 | Origin: upstream |
| 2 | Bug: https://github.com/Microsoft/cpprestsdk/issues/950 |
| 3 | Last-Update: 2018-11-04 |
| 4 | |
| 5 | Index: cpprest/Release/src/utilities/asyncrt_utils.cpp |
| 6 | =================================================================== |
| 7 | --- cpprest.orig/Release/src/utilities/asyncrt_utils.cpp |
| 8 | +++ cpprest/Release/src/utilities/asyncrt_utils.cpp |
| 9 | @@ -356,7 +356,7 @@ |
| 10 | inline size_t count_utf8_to_utf16(const std::string& s) |
| 11 | { |
| 12 | const size_t sSize = s.size(); |
| 13 | - auto sData = reinterpret_cast<const UtilCharInternal_t* const>(s.data()); |
| 14 | + auto const sData = reinterpret_cast<const UtilCharInternal_t*>(s.data()); |
| 15 | size_t result{ sSize }; |
| 16 | |
| 17 | for (size_t index = 0; index < sSize;) |
| 18 | @@ -441,7 +441,7 @@ |
| 19 | { |
| 20 | // Save repeated heap allocations, use the length of resulting sequence. |
| 21 | const size_t srcSize = s.size(); |
| 22 | - auto srcData = reinterpret_cast<const UtilCharInternal_t* const>(s.data()); |
| 23 | + auto const srcData = reinterpret_cast<const UtilCharInternal_t*>(s.data()); |
| 24 | utf16string dest(count_utf8_to_utf16(s), L'\0'); |
| 25 | utf16string::value_type* const destData = &dest[0]; |
| 26 | size_t destIndex = 0; |