From 713742d668a147c752a14f438885a11b592a0c6e Mon Sep 17 00:00:00 2001 From: Guoyi Zhang Date: Tue, 7 May 2024 12:38:56 +0800 Subject: [PATCH] fix: -Wsign-compare --- trim_marker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/trim_marker.cpp b/trim_marker.cpp index 8c04ce1..084c201 100644 --- a/trim_marker.cpp +++ b/trim_marker.cpp @@ -58,7 +58,7 @@ void extract_characters(const std::string& line, const std::string& file, const std::vector positions) { std::ofstream outfile(file, std::ios::app); std::string new_line; - for (int pos : positions) { + for (unsigned long pos : positions) { if (pos <= line.length()) { new_line += line[pos - 1]; // start from 0 }