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

Fix incorrect const in reinterpret_cast (#950) #951

Merged
merged 1 commit into from
Nov 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,7 @@ thomasschaub
Trimble
Tim Boundy (gigaplex)

Rami Abughazaleh (icnocop)
Rami Abughazaleh (icnocop)

TastenTrick
Christian Deneke (chris0x44)
4 changes: 2 additions & 2 deletions Release/src/utilities/asyncrt_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ using UtilCharInternal_t = signed char;
inline size_t count_utf8_to_utf16(const std::string& s)
{
const size_t sSize = s.size();
auto sData = reinterpret_cast<const UtilCharInternal_t* const>(s.data());
auto const sData = reinterpret_cast<const UtilCharInternal_t*>(s.data());
size_t result{ sSize };

for (size_t index = 0; index < sSize;)
Expand Down Expand Up @@ -441,7 +441,7 @@ utf16string __cdecl conversions::utf8_to_utf16(const std::string &s)
{
// Save repeated heap allocations, use the length of resulting sequence.
const size_t srcSize = s.size();
auto srcData = reinterpret_cast<const UtilCharInternal_t* const>(s.data());
auto const srcData = reinterpret_cast<const UtilCharInternal_t*>(s.data());
utf16string dest(count_utf8_to_utf16(s), L'\0');
utf16string::value_type* const destData = &dest[0];
size_t destIndex = 0;
Expand Down