Commit 161d6fe5 authored by Jan Möbius's avatar Jan Möbius

Fixed more cppcheck warnings

parent 0837d5d1
......@@ -252,11 +252,7 @@ stream_vsplits()
VHierarchyNodeHandle node_handle;
OpenMesh::Vec3f pos;
VHierarchyNodeIndex node_index, fund_lcut_index, fund_rcut_index;
float lchild_radius, rchild_radius;
OpenMesh::Vec3f lchild_normal, rchild_normal;
float lchild_sin_square, rchild_sin_square;
float lchild_mue_square, rchild_mue_square;
float lchild_sigma_square, rchild_sigma_square;
unsigned int n_vsplit_packets = (unsigned int) vsplits_.size();
QDataStream qTcp(socket_);
......@@ -277,11 +273,11 @@ stream_vsplits()
node_index = node.node_index();
fund_lcut_index = node.fund_lcut_index();
fund_rcut_index = node.fund_rcut_index();
lchild_radius = lchild.radius(); rchild_radius = rchild.radius();
const float lchild_radius = lchild.radius(); const float rchild_radius = rchild.radius();
lchild_normal = lchild.normal(); rchild_normal = rchild.normal();
lchild_sin_square = lchild.sin_square(); rchild_sin_square = rchild.sin_square();
lchild_mue_square = lchild.mue_square(); rchild_mue_square = rchild.mue_square();
lchild_sigma_square = lchild.sigma_square(); rchild_sigma_square = rchild.sigma_square();
const float lchild_sin_square = lchild.sin_square(); const float rchild_sin_square = rchild.sin_square();
const float lchild_mue_square = lchild.mue_square(); const float rchild_mue_square = rchild.mue_square();
const float lchild_sigma_square = lchild.sigma_square(); const float rchild_sigma_square = rchild.sigma_square();
qTcp << pos[0] << pos[1] << pos[2]
<< node_index.value()
......
......@@ -245,11 +245,7 @@ stream_vsplits()
VHierarchyNodeHandle node_handle;
OpenMesh::Vec3f pos;
VHierarchyNodeIndex node_index, fund_lcut_index, fund_rcut_index;
float lchild_radius, rchild_radius;
OpenMesh::Vec3f lchild_normal, rchild_normal;
float lchild_sin_square, rchild_sin_square;
float lchild_mue_square, rchild_mue_square;
float lchild_sigma_square, rchild_sigma_square;
unsigned int n_vsplit_packets = (unsigned int) vsplits_.size();
QDataStream qTcp(this);
......@@ -270,11 +266,11 @@ stream_vsplits()
node_index = node.node_index();
fund_lcut_index = node.fund_lcut_index();
fund_rcut_index = node.fund_rcut_index();
lchild_radius = lchild.radius(); rchild_radius = rchild.radius();
lchild_normal = lchild.normal(); rchild_normal = rchild.normal();
lchild_sin_square = lchild.sin_square(); rchild_sin_square = rchild.sin_square();
lchild_mue_square = lchild.mue_square(); rchild_mue_square = rchild.mue_square();
lchild_sigma_square = lchild.sigma_square(); rchild_sigma_square = rchild.sigma_square();
const float lchild_radius = lchild.radius(); const float rchild_radius = rchild.radius();
lchild_normal = lchild.normal(); rchild_normal = rchild.normal();
const float lchild_sin_square = lchild.sin_square(); const float rchild_sin_square = rchild.sin_square();
const float lchild_mue_square = lchild.mue_square(); const float rchild_mue_square = rchild.mue_square();
const float lchild_sigma_square = lchild.sigma_square(); const float rchild_sigma_square = rchild.sigma_square();
qTcp << pos[0] << pos[1] << pos[2]
<< node_index.value()
......
......@@ -67,7 +67,8 @@ namespace VDPM {
VHierarchy::
VHierarchy()
VHierarchy() :
n_roots_(0), tree_id_bits_(0)
{
clear();
}
......
......@@ -96,7 +96,7 @@ class VHierarchyNode
{
public:
VHierarchyNode() { }
VHierarchyNode() :radius_(0.0f), sin_square_(0.0f),mue_square_(0.0f), sigma_square_(0.0f) { }
/// Returns true, if node is root else false.
bool is_root() const
......
......@@ -77,27 +77,17 @@ namespace VDPM {
VHierarchyWindow::
VHierarchyWindow()
VHierarchyWindow() :
vhierarchy_(NULL), buffer_(NULL),buffer_min_ (0), buffer_max_(0), window_min_(0), window_max_(0), current_pos_(0) , n_shift_(0)
{
vhierarchy_ = NULL;
buffer_ = NULL;
buffer_min_ = 0;
buffer_max_ = 0;
window_min_ = 0;
window_max_ = 0;
current_pos_ = 0;
n_shift_ = 0;
}
VHierarchyWindow::
VHierarchyWindow(VHierarchy &_vhierarchy)
VHierarchyWindow(VHierarchy &_vhierarchy) :
vhierarchy_(&_vhierarchy),buffer_(NULL),buffer_min_ (0), buffer_max_(0), window_min_(0), window_max_(0) , current_pos_(0) ,n_shift_(0)
{
vhierarchy_ = &_vhierarchy;
buffer_ = NULL;
}
......
......@@ -70,6 +70,9 @@ namespace VDPM {
ViewingParameters::
ViewingParameters()
{
for ( unsigned int i = 0; i < 16; ++i)
modelview_matrix_[i] = 0.0;
fovy_ = 45.0f;
aspect_ = 1.0f;
tolerance_square_ = 0.001f;
......
Markdown is supported
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