MissouriMRDT / Autonomy_Software

Found redundant cloned branches CXX-W2041
Anti-pattern
Minor
3 days ago13 days old
body of if is identical to the body of else
175        // Check which frame we should copy.
176        switch (stContainer.eFrameType)
177        {
178            case PIXEL_FORMATS::eDepthDetection: *(stContainer.pFrame) = m_cvProcFrame; break;179            case PIXEL_FORMATS::eTensorflowDetection: *(stContainer.pFrame) = m_cvProcFrame; break;
180            default: *(stContainer.pFrame) = m_cvProcFrame;
181        }
body of if is identical to the body of else
157        // Determine which frame should be copied.
158        switch (stContainer.eFrameType)
159        {
160            case PIXEL_FORMATS::eBGRA: *(stContainer.pFrame) = m_cvFrame; break;161            case PIXEL_FORMATS::eDepthMeasure: *(stContainer.pFrame) = m_cvDepthMeasure; break;
162            case PIXEL_FORMATS::eDepthImage: *(stContainer.pFrame) = m_cvDepthImage; break;
163            case PIXEL_FORMATS::eXYZ: *(stContainer.pFrame) = m_cvPointCloud; break;
body of if is identical to the body of else
2186                                      }
2187
2188                                      // Check if the spatial map was exported successfully.
2189                                      if (m_slCamera.getSpatialMapRequestStatusAsync() == sl::ERROR_CODE::SUCCESS)2190                                      {
2191                                          // Get and store the spatial map.
2192                                          m_slCamera.retrieveSpatialMapAsync(slSpatialMap);
body of if is identical to the body of else
1480                {
1481                    // Covariance error.
1482                    if (slReturnCode == sl::FUSION_ERROR_CODE::GNSS_DATA_COVARIANCE_MUST_VARY || slReturnCode == sl::FUSION_ERROR_CODE::INVALID_COVARIANCE)
1483                    {1484                        // Submit logger message.
1485                        LOG_WARNING(logging::g_qSharedLogger,
1486                                    "Unable to ingest fusion GNSS data for camera {} ({})! sl::Fusion positional tracking may be inaccurate! sl::FUSION_ERROR_CODE "
body of if is identical to the body of else
1420                // Get the GNSS fix type status from the given GPS coordinate.
1421                switch (stNewGPSLocation.eCoordinateAccuracyFixType)
1422                {
1423                    case geoops::PositionFixType::eNoFix:1424                    {
1425                        slGNSSData.gnss_status = sl::GNSS_STATUS::SINGLE;
1426                        slGNSSData.gnss_mode   = sl::GNSS_MODE::NO_FIX;