Browse Source

Fix clang warnings in plCubicRenderTargetModifier.

Darryl Pogue 12 years ago
parent
commit
e6609c2b71
  1. 46
      Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp

46
Sources/Plasma/PubUtilLib/plPipeline/plCubicRenderTargetModifier.cpp

@ -169,51 +169,51 @@ bool plCubicRenderTargetModifier::IEval( double secs, float del, uint32_t dir
bool plCubicRenderTargetModifier::MsgReceive( plMessage* msg )
{
plSceneObject *scene;
plCubicRenderTarget *cubic;
int i;
plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg);
if( eval )
if (eval)
{
const double secs = eval->DSeconds();
const float del = eval->DelSeconds();
IEval( secs, del, 0 );
IEval(secs, del, 0);
return true;
}
plRefMsg *refMsg = plRefMsg::ConvertNoRef( msg );
if( refMsg )
plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg);
if (refMsg)
{
if( scene = plSceneObject::ConvertNoRef( refMsg->GetRef() ) )
plSceneObject* scene = plSceneObject::ConvertNoRef(refMsg->GetRef());
if (scene)
{
if( refMsg->GetContext() & ( plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace ) )
AddTarget( scene );
if (refMsg->GetContext() & (plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace))
AddTarget(scene);
else
RemoveTarget( scene );
RemoveTarget(scene);
}
if( cubic = plCubicRenderTarget::ConvertNoRef( refMsg->GetRef() ) )
plCubicRenderTarget* cubic = plCubicRenderTarget::ConvertNoRef(refMsg->GetRef());
if (cubic)
{
if( refMsg->GetContext() & ( plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace ) )
if (refMsg->GetContext() & (plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace))
{
fCubic = cubic;
for( i = 0; i < 6; i++ )
ICreateRenderRequest( i );
for (int i = 0; i < 6; i++)
ICreateRenderRequest(i);
}
else
{
fCubic = nil;
for( i = 0; i < 6; i++ )
fCubic = nullptr;
for (int i = 0; i < 6; i++)
{
delete fRequests[ i ];
fRequests[ i ] = nil;
delete fRequests[i];
fRequests[i] = nil;
}
}
}
return true;
}
return plModifier::MsgReceive( msg );
return plModifier::MsgReceive(msg);
}
//// AddTarget ////////////////////////////////////////////////////////////////
@ -256,4 +256,4 @@ void plCubicRenderTargetModifier::Write( hsStream *s, hsResMgr *mgr )
mgr->WriteKey( s, fTarget ); // Write the SceneNode
mgr->WriteKey( s, fCubic ); // Write the cubicRT
}
}

Loading…
Cancel
Save