diff --git a/src/fw-logs/fw-log-data.cpp b/src/fw-logs/fw-log-data.cpp index 8f03495f0e..a250d07ad5 100644 --- a/src/fw-logs/fw-log-data.cpp +++ b/src/fw-logs/fw-log-data.cpp @@ -15,30 +15,6 @@ namespace librealsense { namespace fw_logs { - fw_log_data::fw_log_data() - { - _magic_number = 0; - _severity = 0; - _file_id = 0; - _group_id = 0; - _event_id = 0; - _line = 0; - _sequence = 0; - _p1 = 0; - _p2 = 0; - _p3 = 0; - _timestamp = 0; - _delta = 0; - _message = ""; - _file_name = ""; - } - - - fw_log_data::~fw_log_data() - { - } - - rs2_log_severity fw_log_data::get_severity() const { return fw_logs_severity_to_log_severity(_severity); diff --git a/src/fw-logs/fw-log-data.h b/src/fw-logs/fw-log-data.h index e8f02495bb..183a4d56bb 100644 --- a/src/fw-logs/fw-log-data.h +++ b/src/fw-logs/fw-log-data.h @@ -74,27 +74,24 @@ namespace librealsense class fw_log_data { public: - fw_log_data(); - ~fw_log_data(); + uint32_t _magic_number = 0; + uint32_t _severity = 0; + uint32_t _file_id = 0; + uint32_t _group_id = 0; + uint32_t _event_id = 0; + uint32_t _line = 0; + uint32_t _sequence = 0; + uint32_t _p1 = 0; + uint32_t _p2 = 0; + uint32_t _p3 = 0; + uint64_t _timestamp = 0; + double _delta = 0.0; - uint32_t _magic_number; - uint32_t _severity; - uint32_t _file_id; - uint32_t _group_id; - uint32_t _event_id; - uint32_t _line; - uint32_t _sequence; - uint32_t _p1; - uint32_t _p2; - uint32_t _p3; - uint64_t _timestamp; - double _delta; + uint32_t _thread_id = 0; - uint32_t _thread_id; - - std::string _message; - std::string _file_name; - std::string _thread_name; + std::string _message = ""; + std::string _file_name = ""; + std::string _thread_name = ""; rs2_log_severity get_severity() const; const std::string& get_message() const; diff --git a/src/proc/disparity-transform.h b/src/proc/disparity-transform.h index 92e718051d..fcd4b573a1 100644 --- a/src/proc/disparity-transform.h +++ b/src/proc/disparity-transform.h @@ -33,7 +33,7 @@ namespace librealsense auto in = reinterpret_cast(in_data); auto out = reinterpret_cast(out_data); - bool fp = (std::is_floating_point::value); + const bool fp = (std::is_floating_point::value); const float round = fp ? 0.5f : 0.f; float input{}; diff --git a/src/proc/spatial-filter.h b/src/proc/spatial-filter.h index b9ca9c34d1..c1406f7499 100644 --- a/src/proc/spatial-filter.h +++ b/src/proc/spatial-filter.h @@ -30,7 +30,7 @@ namespace librealsense void dxf_smooth(void *frame_data, float alpha, float delta, int iterations) { static_assert((std::is_arithmetic::value), "Spatial filter assumes numeric types"); - bool fp = (std::is_floating_point::value); + const bool fp = (std::is_floating_point::value); for (int i = 0; i < iterations; i++) { @@ -61,7 +61,7 @@ namespace librealsense size_t v{}, u{}; // Handle conversions for invalid input data - bool fp = (std::is_floating_point::value); + const bool fp = (std::is_floating_point::value); // Filtering integer values requires round-up to the nearest discrete value const float round = fp ? 0.f : 0.5f; @@ -156,7 +156,7 @@ namespace librealsense size_t v{}, u{}; // Handle conversions for invalid input data - bool fp = (std::is_floating_point::value); + const bool fp = (std::is_floating_point::value); // Filtering integer values requires round-up to the nearest discrete value const float round = fp ? 0.f : 0.5f;