Skip to content

Commit 5027cab

Browse files
chris0x44BillyONeal
authored andcommitted
Fix incorrect const in reinterpret_cast (#950) (#951)
1 parent 1aeab07 commit 5027cab

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

CONTRIBUTORS.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,7 @@ thomasschaub
4545
Trimble
4646
Tim Boundy (gigaplex)
4747

48-
Rami Abughazaleh (icnocop)
48+
Rami Abughazaleh (icnocop)
49+
50+
TastenTrick
51+
Christian Deneke (chris0x44)

Release/src/utilities/asyncrt_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ using UtilCharInternal_t = signed char;
356356
inline size_t count_utf8_to_utf16(const std::string& s)
357357
{
358358
const size_t sSize = s.size();
359-
auto sData = reinterpret_cast<const UtilCharInternal_t* const>(s.data());
359+
auto const sData = reinterpret_cast<const UtilCharInternal_t*>(s.data());
360360
size_t result{ sSize };
361361

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

0 commit comments

Comments
 (0)