Skip to content

Commit

Permalink
Bug 1353593 - Part 1: Allow implicit conversion of non-const char16pt…
Browse files Browse the repository at this point in the history
…r_t to wchar*. r=froydnj
  • Loading branch information
EricRahm committed Jun 12, 2017
1 parent c8ccaa5 commit e08fbaa
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mfbt/Char16.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ class char16ptr_t
{
return reinterpret_cast<const wchar_t*>(mPtr);
}

operator wchar_t*()
{
return const_cast<wchar_t*>(reinterpret_cast<const wchar_t*>(mPtr));
}

operator const void*() const
{
return mPtr;
Expand Down

0 comments on commit e08fbaa

Please sign in to comment.