From 0c0ff31475387e204f8b6b7fdadb2082f93870d6 Mon Sep 17 00:00:00 2001 From: zhaoshijie Date: Sat, 14 Jun 2025 21:57:14 +0800 Subject: [PATCH] Fix range-loop-construct warning --- mindspore/ccsrc/debug/data_dump/dump_utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mindspore/ccsrc/debug/data_dump/dump_utils.cc b/mindspore/ccsrc/debug/data_dump/dump_utils.cc index 9e96d7b326a..ef94896d298 100644 --- a/mindspore/ccsrc/debug/data_dump/dump_utils.cc +++ b/mindspore/ccsrc/debug/data_dump/dump_utils.cc @@ -69,7 +69,7 @@ std::string GenerateDumpPath(uint32_t graph_id, uint32_t rank_id, bool is_cst) { void GetFileKernelName(NotNull kernel_name) { const std::string strsrc_to_replace[4] = {"/", "\\", ".", " "}; const std::string strdst = "_"; - for (const std::string strsrc : strsrc_to_replace) { + for (const std::string &strsrc : strsrc_to_replace) { std::string::size_type pos = 0; std::string::size_type srclen = strsrc.size(); std::string::size_type dstlen = strdst.size();