Skip to content

Commit

Permalink
Fix incorrect const in reinterpret_cast (#950) (#951)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris0x44 authored and BillyONeal committed Nov 7, 2018
1 parent 1aeab07 commit 5027cab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
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

0 comments on commit 5027cab

Please sign in to comment.