mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
revert dynamic_cast -> static_cast
This commit is contained in:
parent
6c618a5842
commit
bdea66e6dd
@ -460,8 +460,8 @@ void Direct3DRMSDL3GPURenderer::AddTextureDestroyCallback(Uint32 id, IDirect3DRM
|
|||||||
|
|
||||||
Uint32 Direct3DRMSDL3GPURenderer::GetTextureId(IDirect3DRMTexture* iTexture)
|
Uint32 Direct3DRMSDL3GPURenderer::GetTextureId(IDirect3DRMTexture* iTexture)
|
||||||
{
|
{
|
||||||
auto texture = dynamic_cast<Direct3DRMTextureImpl*>(iTexture);
|
auto texture = static_cast<Direct3DRMTextureImpl*>(iTexture);
|
||||||
auto surface = dynamic_cast<DirectDrawSurfaceImpl*>(texture->m_surface);
|
auto surface = static_cast<DirectDrawSurfaceImpl*>(texture->m_surface);
|
||||||
SDL_Surface* surf = surface->m_surface;
|
SDL_Surface* surf = surface->m_surface;
|
||||||
|
|
||||||
for (Uint32 i = 0; i < m_textures.size(); ++i) {
|
for (Uint32 i = 0; i < m_textures.size(); ++i) {
|
||||||
|
|||||||
@ -370,8 +370,8 @@ void Direct3DRMSoftwareRenderer::AddTextureDestroyCallback(Uint32 id, IDirect3DR
|
|||||||
|
|
||||||
Uint32 Direct3DRMSoftwareRenderer::GetTextureId(IDirect3DRMTexture* iTexture)
|
Uint32 Direct3DRMSoftwareRenderer::GetTextureId(IDirect3DRMTexture* iTexture)
|
||||||
{
|
{
|
||||||
auto texture = dynamic_cast<Direct3DRMTextureImpl*>(iTexture);
|
auto texture = static_cast<Direct3DRMTextureImpl*>(iTexture);
|
||||||
auto surface = dynamic_cast<DirectDrawSurfaceImpl*>(texture->m_surface);
|
auto surface = static_cast<DirectDrawSurfaceImpl*>(texture->m_surface);
|
||||||
|
|
||||||
// Check if already mapped
|
// Check if already mapped
|
||||||
for (Uint32 i = 0; i < m_textures.size(); ++i) {
|
for (Uint32 i = 0; i < m_textures.size(); ++i) {
|
||||||
|
|||||||
@ -31,12 +31,12 @@ HRESULT Direct3DRMDevice2Impl::QueryInterface(const GUID& riid, void** ppvObject
|
|||||||
{
|
{
|
||||||
if (SDL_memcmp(&riid, &IID_IDirect3DRMDevice2, sizeof(riid)) == 0) {
|
if (SDL_memcmp(&riid, &IID_IDirect3DRMDevice2, sizeof(riid)) == 0) {
|
||||||
this->IUnknown::AddRef();
|
this->IUnknown::AddRef();
|
||||||
*ppvObject = dynamic_cast<IDirect3DRMDevice2*>(this);
|
*ppvObject = static_cast<IDirect3DRMDevice2*>(this);
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
else if (SDL_memcmp(&riid, &IID_IDirect3DRMMiniwinDevice, sizeof(riid)) == 0) {
|
else if (SDL_memcmp(&riid, &IID_IDirect3DRMMiniwinDevice, sizeof(riid)) == 0) {
|
||||||
this->IUnknown::AddRef();
|
this->IUnknown::AddRef();
|
||||||
*ppvObject = dynamic_cast<IDirect3DRMMiniwinDevice*>(this);
|
*ppvObject = static_cast<IDirect3DRMMiniwinDevice*>(this);
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
}
|
}
|
||||||
MINIWIN_NOT_IMPLEMENTED();
|
MINIWIN_NOT_IMPLEMENTED();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user