mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Bug 1766549 - Remove some char16ptr_t operators that allow implicit const-casting. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D144777
This commit is contained in:
parent
00732bfa12
commit
c5fea3fa51
@ -58,13 +58,6 @@ class char16ptr_t {
|
||||
constexpr operator const void*() const { return mPtr; }
|
||||
constexpr explicit operator bool() const { return mPtr != nullptr; }
|
||||
|
||||
/* Explicit cast operators to allow things like (char16_t*)str. */
|
||||
constexpr explicit operator char16_t*() const {
|
||||
return const_cast<char16_t*>(mPtr);
|
||||
}
|
||||
explicit operator wchar_t*() const {
|
||||
return const_cast<wchar_t*>(static_cast<const wchar_t*>(*this));
|
||||
}
|
||||
explicit operator int() const { return reinterpret_cast<intptr_t>(mPtr); }
|
||||
explicit operator unsigned int() const {
|
||||
return reinterpret_cast<uintptr_t>(mPtr);
|
||||
|
Loading…
Reference in New Issue
Block a user