sensord: fix coding rule violations 17/149217/2
authorkibak.yoon <kibak.yoon@samsung.com>
Mon, 11 Sep 2017 12:37:20 +0000 (21:37 +0900)
committerkibak.yoon <kibak.yoon@samsung.com>
Tue, 12 Sep 2017 06:07:54 +0000 (15:07 +0900)
Change-Id: I19591605e855fdbd1b44aae8fed8fe9ded23ee16
Signed-off-by: kibak.yoon <kibak.yoon@samsung.com>
src/sensor/gesture/face_down_alg_impl.h
src/sensor/pedometer/pedometer.h
src/sensor/rotation_vector/fusion_base.cpp
src/sensor/rotation_vector/fusion_utils/matrix.cpp
src/sensor/rotation_vector/fusion_utils/vector.cpp
src/sensorctl/loopback.cpp
src/sensorctl/test_bench.cpp
src/sensorctl/testcase/unit_ipc.cpp

index 4afa3bb..997719d 100644 (file)
@@ -38,7 +38,6 @@ private:
        void remove_old_up_time(void);
        unsigned long long is_facing_down();
        unsigned long long was_facing_up();
-
 };
 
 #endif /* __FACE_DOWN_ALG_IMPL_H__ */
index edf3638..f80c315 100644 (file)
@@ -73,7 +73,6 @@ private:
        bool m_some_speed;
 
        sensor_frequency_compensator m_acceleration_compensator;
-
 };
 
 #endif /* __PEDOMETER_H__ */
index ad92d2a..fbd887d 100644 (file)
@@ -80,7 +80,6 @@ void fusion_base::push_mag(sensor_data_t &data)
        m_enable_magnetic = true;
        if (get_orientation())
                store_orientation();
-
 }
 
 bool fusion_base::get_rv(unsigned long long &timestamp, float &x, float &y, float &z, float &w)
index 62f0555..2b1c177 100644 (file)
@@ -156,17 +156,15 @@ T_R_C matrix<T, R, C> operator /(const matrix<T, R, C> m1, const T val)
 
 T_R1_C1_R2_C2 bool operator ==(const matrix<T, R1, C1> m1, const matrix<T, R2, C2> m2)
 {
-       if ((R1 == R2) && (C1 == C2))
-       {
+       if ((R1 == R2) && (C1 == C2)) {
                for (int i = 0; i < R1; i++)
                        for (int j = 0; j < C2; j++)
                                if (m1.m_mat[i][j] != m2.m_mat[i][j])
                                        return false;
+               return true;
        }
-       else
-               return false;
 
-       return true;
+       return false;
 }
 
 T_R1_C1_R2_C2 bool operator !=(const matrix<T, R1, C1> m1, const matrix<T, R2, C2> m2)
index 432cb66..d06ad7d 100644 (file)
@@ -155,16 +155,14 @@ T_S vect<T, S> operator /(const vect<T, S> v, const T val)
 
 T_S1_S2 bool operator ==(const vect<T, S1> v1, const vect<T, S2> v2)
 {
-       if (S1 == S2)
-       {
+       if (S1 == S2) {
                for (int i = 0; i < S1; i++)
                        if (v1.m_vec[i] != v2.m_vec[i])
                                return false;
+               return true;
        }
-       else
-               return false;
 
-       return true;
+       return false;
 }
 
 T_S1_S2 bool operator !=(const vect<T, S1> v1, const vect<T, S2> v2)
index ee177b8..b890f47 100644 (file)
@@ -58,7 +58,7 @@ bool loopback_manager::run(int argc, char *argv[])
                 *  sensorhub (bytes) command [0~1] delaytime [2~5] data[6~83]
                 *      shell (argv)  command [0~2] delaytime [3]   data[4~81]
                 */
-               char test_data[MAX_DATA_SIZE] = {SHUB_INST_LIB_ADD, SHUB_LOOP_BACK_LIB,};
+               char test_data[MAX_DATA_SIZE] = {SHUB_INST_LIB_ADD, SHUB_LOOP_BACK_LIB, };
                int_to_bytes(atoi(argv[3]), sizeof(int), &(test_data[2]));
 
                for (int i = 4; i < argc; i++)
@@ -75,7 +75,7 @@ bool loopback_manager::run(int argc, char *argv[])
                sensor = sensord_get_sensor(CONTEXT_SENSOR);
                handle = sensord_connect(sensor);
 
-               char test_data[4] = {SHUB_INST_LIB_REMOVE, SHUB_LOOP_BACK_LIB,};
+               char test_data[4] = {SHUB_INST_LIB_REMOVE, SHUB_LOOP_BACK_LIB, };
 
                sensord_set_attribute_str(handle, 0, test_data, sizeof(test_data));
                sensord_disconnect(handle);
index db0b974..8e5b5d8 100644 (file)
@@ -237,7 +237,6 @@ void test_bench::show(void)
 
        for (auto it = testcases.begin(); it != testcases.end();
                        it = testcases.upper_bound(it->first)) {
-
                auto range = testcases.equal_range(it->first);
                _I("[%s]\n", it->first.c_str());
 
index 799924a..c11d439 100644 (file)
@@ -112,7 +112,7 @@ static bool run_ipc_client_sleep_1s(const char *str, int size, int count)
 
        message msg;
        message reply;
-       char buf[MAX_BUF_SIZE] = {'1', '1', '1',};
+       char buf[MAX_BUF_SIZE] = {'1', '1', '1', };
 
        msg.enclose(buf, MAX_BUF_SIZE);
 
@@ -147,7 +147,7 @@ static bool run_ipc_client_small_buffer(const char *str, int size, int count)
        int ret;
        message msg;
        message reply;
-       char buf[MAX_BUF_SIZE] = {'1', '1', '1',};
+       char buf[MAX_BUF_SIZE] = {'1', '1', '1', };
 
        msg.enclose(buf, MAX_BUF_SIZE);
 
@@ -190,7 +190,7 @@ static bool run_ipc_client_1M(const char *str, int size, int count)
        int ret;
        message msg;
        message reply;
-       char buf[MAX_BUF_SIZE] = {'1', '1', '1',};
+       char buf[MAX_BUF_SIZE] = {'1', '1', '1', };
 
        msg.enclose(buf, MAX_BUF_SIZE);