Commit 870cdb35 authored by Jan Möbius's avatar Jan Möbius
Browse files

Lots of cppcheck fixes


git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@18765 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 09c7e5fd
......@@ -159,7 +159,6 @@ void IRenderer::traverseRenderableNodes( ACG::GLState* _glState, ACG::SceneGraph
if (_node)
{
ACG::SceneGraph::BaseNode::StatusMode status(_node->status());
bool process_children(status != ACG::SceneGraph::BaseNode::HideChildren);
ACG::SceneGraph::DrawModes::DrawMode nodeDM = _node->drawMode();
......@@ -184,7 +183,8 @@ void IRenderer::traverseRenderableNodes( ACG::GLState* _glState, ACG::SceneGraph
if (_node->status() != ACG::SceneGraph::BaseNode::HideNode)
_node->getRenderObjects(this, *_glState, nodeDM, _mat);
if (process_children)
// Process children?
if (status != ACG::SceneGraph::BaseNode::HideChildren)
{
ACG::SceneGraph::BaseNode::ChildIter cIt, cEnd(_node->childrenEnd());
......
......@@ -778,7 +778,7 @@ const DrawMode& addDrawMode( const std::string & _name , bool _propertyBased)
//----------------------------------------------------------------------------
ACGDLLEXPORT
const DrawMode& addDrawMode( const std::string & _name, const DrawModeProperties _properties)
const DrawMode& addDrawMode( const std::string & _name, const DrawModeProperties& _properties)
{
const DrawMode& drawmode = addDrawMode( _name , true );
......
......@@ -637,7 +637,7 @@ namespace DrawModes {
* @return Id of the new draw mode
*/
ACGDLLEXPORT
const DrawMode& addDrawMode( const std::string & _name, const DrawModeProperties _properties);
const DrawMode& addDrawMode( const std::string & _name, const DrawModeProperties& _properties);
/** \brief Get a custom DrawMode.
*
......
......@@ -139,12 +139,14 @@ traverse( BaseNode* _node, Action& _action )
if (_node)
{
BaseNode::StatusMode status(_node->status());
bool process_children(status != BaseNode::HideChildren);
// If the subtree is hidden, ignore this node and its children while rendering
if (status != BaseNode::HideSubtree)
{
bool process_children(status != BaseNode::HideChildren);
// If the node itself is hidden, ignore it but continue with its children
if (_node->status() != BaseNode::HideNode)
{
......@@ -210,11 +212,13 @@ traverse_multipass ( BaseNode* _node, Action& _action, const unsigned int& _pass
// Process node if it exists
if (_node) {
BaseNode::StatusMode status(_node->status());
bool process_children(status != BaseNode::HideChildren);
// If the subtree is hidden, ignore this node and its children while rendering
if (status != BaseNode::HideSubtree) {
bool process_children(status != BaseNode::HideChildren);
// Executes this nodes enter function (if available and active in multipass)
if ( _node->multipassStatusActive(_pass) ) {
if_has_enter(_action, _node);
......
......@@ -426,7 +426,7 @@ QPoint mapToLocal( const QPoint _point ) {
return examiner_widgets_[activeExaminer_]->glMapFromGlobal(_point);
}
void setDrawMode( const ACG::SceneGraph::DrawModes::DrawMode _mode , int _viewer) {
void setDrawMode( const ACG::SceneGraph::DrawModes::DrawMode _mode& , int _viewer) {
if ( _viewer == ACTIVE_VIEWER )
viewerProperties(activeExaminer()).drawMode(_mode);
......
......@@ -356,7 +356,7 @@ void perspectiveProjection( int _viewer = ALL_VIEWERS );
* @param _mode New drawmode of the given viewer
*/
DLLEXPORT
void setDrawMode( const ACG::SceneGraph::DrawModes::DrawMode _mode , int _viewer = ALL_VIEWERS);
void setDrawMode( const ACG::SceneGraph::DrawModes::DrawMode& _mode , int _viewer = ALL_VIEWERS);
/** \brief Get the current draw Mode of a Viewer
*
......
......@@ -331,7 +331,6 @@ void DepthPeelingPlugin::traverseLightNodes( BaseNode* _node)
if (_node)
{
BaseNode::StatusMode status(_node->status());
bool process_children(status != BaseNode::HideChildren);
// If the subtree is hidden, ignore this node and its children while rendering
if (status != BaseNode::HideSubtree)
......@@ -371,7 +370,8 @@ void DepthPeelingPlugin::traverseLightNodes( BaseNode* _node)
}
}
if (process_children)
// Process children?
if (status != BaseNode::HideChildren)
{
BaseNode::ChildIter cIt, cEnd(_node->childrenEnd());
......@@ -914,11 +914,12 @@ DepthPeelingPlugin::traverseDraw( BaseNode* _node, Action& _action, ACG::SceneGr
// Process node if it exists
if (_node) {
BaseNode::StatusMode status(_node->status());
bool process_children(status != BaseNode::HideChildren);
// If the subtree is hidden, ignore this node and its children while rendering
if (status != BaseNode::HideSubtree) {
bool process_children(status != BaseNode::HideChildren);
// Executes this nodes enter function (if available and active in multipass)
if ( _node->multipassStatusActive(_pass) ) {
if_has_enter(_action, _node);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment