Browse Source

Fix clang warnings in plCubicRenderTargetModifier.

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

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

@ -169,11 +169,6 @@ bool plCubicRenderTargetModifier::IEval( double secs, float del, uint32_t dir
bool plCubicRenderTargetModifier::MsgReceive( plMessage* msg ) bool plCubicRenderTargetModifier::MsgReceive( plMessage* msg )
{ {
plSceneObject *scene;
plCubicRenderTarget *cubic;
int i;
plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg); plEvalMsg* eval = plEvalMsg::ConvertNoRef(msg);
if (eval) if (eval)
{ {
@ -182,34 +177,39 @@ bool plCubicRenderTargetModifier::MsgReceive( plMessage* msg )
IEval(secs, del, 0); IEval(secs, del, 0);
return true; return true;
} }
plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg); plRefMsg* refMsg = plRefMsg::ConvertNoRef(msg);
if (refMsg) 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)) if (refMsg->GetContext() & (plRefMsg::kOnCreate | plRefMsg::kOnRequest | plRefMsg::kOnReplace))
AddTarget(scene); AddTarget(scene);
else 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; fCubic = cubic;
for( i = 0; i < 6; i++ ) for (int i = 0; i < 6; i++)
ICreateRenderRequest(i); ICreateRenderRequest(i);
} }
else else
{ {
fCubic = nil; fCubic = nullptr;
for( i = 0; i < 6; i++ ) for (int i = 0; i < 6; i++)
{ {
delete fRequests[i]; delete fRequests[i];
fRequests[i] = nil; fRequests[i] = nil;
} }
} }
} }
return true; return true;
} }

Loading…
Cancel
Save