From 3a5d21cbadee574b412ba84f1e3dc6053d4b068b Mon Sep 17 00:00:00 2001 From: kobayu858 Date: Wed, 10 Jul 2024 19:43:39 +0900 Subject: [PATCH] fix:shadowVariable Signed-off-by: kobayu858 --- perception/tensorrt_yolox/src/tensorrt_yolox.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/perception/tensorrt_yolox/src/tensorrt_yolox.cpp b/perception/tensorrt_yolox/src/tensorrt_yolox.cpp index 94c795cfc2403..bb6975d7a1f21 100644 --- a/perception/tensorrt_yolox/src/tensorrt_yolox.cpp +++ b/perception/tensorrt_yolox/src/tensorrt_yolox.cpp @@ -130,12 +130,12 @@ std::vector get_seg_colormap(const std::string & filen cmap.name = name; colormapString.erase(0, npos + 1); while (!colormapString.empty()) { - size_t npos = colormapString.find_first_of(','); - if (npos != std::string::npos) { - substr = colormapString.substr(0, npos); + size_t inner_npos = colormapString.find_first_of(','); + if (inner_npos != std::string::npos) { + substr = colormapString.substr(0, inner_npos); unsigned char c = (unsigned char)std::stoi(trim(substr)); cmap.color.push_back(c); - colormapString.erase(0, npos + 1); + colormapString.erase(0, inner_npos + 1); } else { unsigned char c = (unsigned char)std::stoi(trim(colormapString)); cmap.color.push_back(c);