diff --git a/include/wsl/wrladapter.h b/include/wsl/wrladapter.h index 37707cc..423d5bc 100644 --- a/include/wsl/wrladapter.h +++ b/include/wsl/wrladapter.h @@ -717,8 +717,8 @@ namespace WRL ULONG ref = InternalRelease(); if (ref == 0) { - ~RuntimeClassImpl(); - delete[] static_cast(this); + this->~RuntimeClassImpl(); + delete[] reinterpret_cast(this); } return ref; @@ -784,7 +784,7 @@ namespace WRL new (buffer.get())T(std::forward(args)...); } - return ComPtr{buffer.release()}; + return ComPtr{reinterpret_cast(buffer.release())}; } using Details::ChainInterfaces;