Cleanup - Removing redundunt assignments from vector.cpp and matrix.cpp 47/33347/1
authorAnkur <ankur29.garg@samsung.com>
Thu, 8 Jan 2015 12:15:42 +0000 (17:45 +0530)
committerAnkur <ankur29.garg@samsung.com>
Thu, 8 Jan 2015 12:15:49 +0000 (17:45 +0530)
The assignments were redundunt as in the next line only, the same variable was being assigned to some other value.

Change-Id: Iebe65db1bb1705466314a968117d7cc5a678ccff

src/sensor_fusion/matrix.cpp
src/sensor_fusion/vector.cpp

index b742fdf..9eabcea 100755 (executable)
@@ -30,7 +30,6 @@ matrix<TYPE>::matrix(const int rows, const int cols)
 {
        m_rows = rows;
        m_cols = cols;
-       m_mat = NULL;
        m_mat = new TYPE *[m_rows];
 
        for (int i = 0; i < m_rows; i++)
@@ -42,7 +41,6 @@ matrix<TYPE>::matrix(const matrix<TYPE>& m)
 {
        m_rows = m.m_rows;
        m_cols = m.m_cols;
-       m_mat = NULL;
        m_mat = new TYPE *[m_rows];
 
        for (int i = 0; i < m_rows; i++)
@@ -58,7 +56,6 @@ matrix<TYPE>::matrix(const int rows, const int cols, TYPE *mat_data)
 {
        m_rows = rows;
        m_cols = cols;
-       m_mat = NULL;
        m_mat = new TYPE *[m_rows];
 
        for (int i = 0; i < m_rows; i++)
index a51c72d..5ab9862 100644 (file)
@@ -29,7 +29,6 @@ template <typename TYPE>
 vect<TYPE>::vect(const int size)
 {
        m_size = size;
-       m_vec = NULL;
        m_vec = new TYPE [m_size]();
 }
 
@@ -37,7 +36,6 @@ template <typename TYPE>
 vect<TYPE>::vect(const int size, TYPE *vec_data)
 {
        m_size = size;
-       m_vec = NULL;
        m_vec = new TYPE [m_size];
 
        for (int j = 0; j < m_size; j++)
@@ -48,7 +46,6 @@ template <typename TYPE>
 vect<TYPE>::vect(const vect<TYPE>& v)
 {
        m_size = v.m_size;
-       m_vec = NULL;
        m_vec = new TYPE [m_size];
 
        for (int q = 0; q < m_size; q++)