diff --git a/src/runtime_src/core/tools/common/SubCmdExamineInternal.cpp b/src/runtime_src/core/tools/common/SubCmdExamineInternal.cpp index 247844ab70..0cbe67ef2c 100644 --- a/src/runtime_src/core/tools/common/SubCmdExamineInternal.cpp +++ b/src/runtime_src/core/tools/common/SubCmdExamineInternal.cpp @@ -249,15 +249,15 @@ SubCmdExamineInternal::getReportsList(const xrt_core::smi::tuple_vector& reports // Vector to store the matched reports std::vector> matchedReports; - for (const auto& report : fullReportCollection) { - auto it = std::find_if(reports.begin(), reports.end(), - [&report](const std::tuple& rep) { - return (std::get<0>(rep) == report->getReportName() && - (std::get<2>(rep) != "hidden" || XBU::getShowHidden())); - }); - - if (it != reports.end()) { - matchedReports.push_back(report); + for (const auto& rep : reports) { + auto it = std::find_if(fullReportCollection.begin(), fullReportCollection.end(), + [&rep](const std::shared_ptr& report) { + return std::get<0>(rep) == report->getReportName() && + (std::get<2>(rep) != "hidden" || XBU::getShowHidden()); + }); + + if (it != fullReportCollection.end()) { + matchedReports.push_back(*it); } } diff --git a/src/runtime_src/core/tools/xbutil2/SubCmdValidate.cpp b/src/runtime_src/core/tools/xbutil2/SubCmdValidate.cpp index 3359beec98..11ca236a86 100644 --- a/src/runtime_src/core/tools/xbutil2/SubCmdValidate.cpp +++ b/src/runtime_src/core/tools/xbutil2/SubCmdValidate.cpp @@ -715,15 +715,15 @@ SubCmdValidate::getTestList(const xrt_core::smi::tuple_vector& tests) const // Vector to store the matched tests std::vector> matchedTests; - for (const auto& runner : testSuite) { - auto it = std::find_if(tests.begin(), tests.end(), - [&runner](const std::tuple& test) { - return (std::get<0>(test) == runner->getConfigName() && - (std::get<2>(test) != "hidden" || XBU::getShowHidden())); - }); - - if (it != tests.end()) { - matchedTests.push_back(runner); + for (const auto& test : tests) { + auto it = std::find_if(testSuite.begin(), testSuite.end(), + [&test](const std::shared_ptr& runner) { + return std::get<0>(test) == runner->getConfigName() && + (std::get<2>(test) != "hidden" || XBU::getShowHidden()); + }); + + if (it != testSuite.end()) { + matchedTests.push_back(*it); } } return matchedTests;