diff --git a/samples/cpp/benchmark_app/main.cpp b/samples/cpp/benchmark_app/main.cpp index 7d382b2c09c..2f42c8ab83f 100644 --- a/samples/cpp/benchmark_app/main.cpp +++ b/samples/cpp/benchmark_app/main.cpp @@ -349,7 +349,7 @@ int main(int argc, char* argv[]) { std::stringstream strm(it_device_nstreams->second); std::map devices_property; ov::util::Read>{}(strm, devices_property); - for (auto it : devices_property) { + for (auto& it : devices_property) { device_config.insert( ov::device::properties(it.first, ov::num_streams(std::stoi(it.second)))); } diff --git a/src/plugins/auto/plugin.cpp b/src/plugins/auto/plugin.cpp index 4f047aff2e0..aac145ceb66 100644 --- a/src/plugins/auto/plugin.cpp +++ b/src/plugins/auto/plugin.cpp @@ -534,7 +534,7 @@ IExecutableNetworkInternal::Ptr MultiDeviceInferencePlugin::LoadNetworkImpl(cons // checking the perf counters config from the loaded network to respect both device's plugin and load-specific setting size_t num_plugins_supporting_perf_counters = 0; - for (auto n : executableNetworkPerDevice) { + for (auto& n : executableNetworkPerDevice) { try { num_plugins_supporting_perf_counters += n.second->GetConfig(PluginConfigParams::KEY_PERF_COUNT).as() ==