diff --git a/src/sensor.cpp b/src/sensor.cpp index 2ac9b5f873..87a529323e 100644 --- a/src/sensor.cpp +++ b/src/sensor.cpp @@ -141,34 +141,20 @@ namespace librealsense rs2_format sensor_base::fourcc_to_rs2_format(uint32_t fourcc_format) const { - rs2_format f = RS2_FORMAT_ANY; + auto it = _fourcc_to_rs2_format->find( fourcc_format ); + if( it != _fourcc_to_rs2_format->end() ) + return it->second; - std::find_if(_fourcc_to_rs2_format->begin(), _fourcc_to_rs2_format->end(), [&fourcc_format, &f](const std::pair& p) { - if (p.first == fourcc_format) - { - f = p.second; - return true; - } - return false; - }); - - return f; + return RS2_FORMAT_ANY; } rs2_stream sensor_base::fourcc_to_rs2_stream(uint32_t fourcc_format) const { - rs2_stream s = RS2_STREAM_ANY; + auto it = _fourcc_to_rs2_stream->find( fourcc_format ); + if( it != _fourcc_to_rs2_stream->end() ) + return it->second; - std::find_if(_fourcc_to_rs2_stream->begin(), _fourcc_to_rs2_stream->end(), [&fourcc_format, &s](const std::pair& p) { - if (p.first == fourcc_format) - { - s = p.second; - return true; - } - return false; - }); - - return s; + return RS2_STREAM_ANY; } void sensor_base::raise_on_before_streaming_changes(bool streaming) @@ -1506,7 +1492,7 @@ namespace librealsense { for (size_t i = 0; i < composite->get_embedded_frames_count(); i++) { - processed_frames.push_back(composite->get_frame(i)); + processed_frames.push_back( composite->get_frame( (int)i ) ); } } diff --git a/unit-tests/LRS_windows_compile_pipeline.stats b/unit-tests/LRS_windows_compile_pipeline.stats index 46e3f288e1..8f4042cbfd 100644 --- a/unit-tests/LRS_windows_compile_pipeline.stats +++ b/unit-tests/LRS_windows_compile_pipeline.stats @@ -1,2 +1,2 @@ -warnings 343 +warnings 342