mirror of
https://github.com/isledecomp/isle-portable.git
synced 2026-02-03 12:31:15 +00:00
Apply suggestions from code review
This commit is contained in:
parent
0fe3b27c6d
commit
08ed4ac907
@ -29,9 +29,6 @@ class Direct3DRMArrayBase : public ArrayInterface {
|
|||||||
return DDERR_INVALIDPARAMS;
|
return DDERR_INVALIDPARAMS;
|
||||||
}
|
}
|
||||||
auto inImpl = static_cast<ActualType*>(in);
|
auto inImpl = static_cast<ActualType*>(in);
|
||||||
if (!inImpl) {
|
|
||||||
return DDERR_INVALIDPARAMS;
|
|
||||||
}
|
|
||||||
inImpl->AddRef();
|
inImpl->AddRef();
|
||||||
m_items.push_back(inImpl);
|
m_items.push_back(inImpl);
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
|
|||||||
@ -46,10 +46,10 @@ HRESULT Direct3DRMFrameImpl::QueryInterface(const GUID& riid, void** ppvObject)
|
|||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::AddChild(IDirect3DRMFrame* child)
|
HRESULT Direct3DRMFrameImpl::AddChild(IDirect3DRMFrame* child)
|
||||||
{
|
{
|
||||||
Direct3DRMFrameImpl* childImpl = static_cast<Direct3DRMFrameImpl*>(child);
|
if (!child) {
|
||||||
if (!childImpl) {
|
|
||||||
return DDERR_GENERIC;
|
return DDERR_GENERIC;
|
||||||
}
|
}
|
||||||
|
Direct3DRMFrameImpl* childImpl = static_cast<Direct3DRMFrameImpl*>(child);
|
||||||
if (childImpl->m_parent) {
|
if (childImpl->m_parent) {
|
||||||
if (childImpl->m_parent == this) {
|
if (childImpl->m_parent == this) {
|
||||||
return DD_OK;
|
return DD_OK;
|
||||||
@ -198,8 +198,7 @@ HRESULT Direct3DRMFrameImpl::SetColor(D3DCOLOR c)
|
|||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::SetColorRGB(float r, float g, float b)
|
HRESULT Direct3DRMFrameImpl::SetColorRGB(float r, float g, float b)
|
||||||
{
|
{
|
||||||
SetColor(r, g, b, 1.f);
|
return SetColor(r, g, b, 1.f);
|
||||||
return DD_OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT Direct3DRMFrameImpl::SetMaterialMode(D3DRMMATERIALMODE mode)
|
HRESULT Direct3DRMFrameImpl::SetMaterialMode(D3DRMMATERIALMODE mode)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user