sysman: change loop to use reference than new variable.

Signed-off-by: Vilvaraj, T J Vivek <t.j.vivek.vilvaraj@intel.com>
This commit is contained in:
Vilvaraj, T J Vivek 2021-03-02 20:15:40 +05:30 committed by Compute-Runtime-Automation
parent 2640877417
commit d0d15dd058
1 changed files with 3 additions and 3 deletions

View File

@ -19,13 +19,13 @@ ze_result_t OsFirmware::getSupportedFwTypes(std::vector<std::string> &supportedF
LinuxSysmanImp *pLinuxSysmanImp = static_cast<LinuxSysmanImp *>(pOsSysman);
FsAccess *pFsAccess = &pLinuxSysmanImp->getFsAccess();
std::vector<std::string> mtdDescriptorStrings;
std::vector<std::string> mtdDescriptorStrings = {};
ze_result_t result = pFsAccess->read(mtdDescriptor, mtdDescriptorStrings);
if (result != ZE_RESULT_SUCCESS) {
return result;
}
for (std::string readByteLine : mtdDescriptorStrings) {
for (std::string fwType : deviceSupportedFwTypes) {
for (const auto &readByteLine : mtdDescriptorStrings) {
for (const auto &fwType : deviceSupportedFwTypes) {
if (std::string::npos != readByteLine.find(fwType)) {
supportedFwTypes.push_back(fwType);
}