]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Included suggestion from @neheb
authorinventor500 <isaacganoung@gmail.com>
Wed, 25 Sep 2024 15:21:20 +0000 (10:21 -0500)
committerNick Terrell <nickrterrell@gmail.com>
Wed, 25 Sep 2024 16:51:05 +0000 (09:51 -0700)
contrib/pzstd/Options.cpp

index 43ea2721d98f77d9e31b33e213aa2688ba20714d..90841b9bb04c9f0cb70ff0f204ea68c593c06659 100644 (file)
@@ -322,7 +322,7 @@ Options::Status Options::parse(int argc, const char **argv) {
   g_utilDisplayLevel = verbosity;
   // Remove local input files that are symbolic links
   if (!followLinks) {
-         std::ignore = std::remove_if(localInputFiles.begin(), localInputFiles.end(),
+         localInputFiles.erase(std::remove_if(localInputFiles.begin(), localInputFiles.end(),
                      [&](const char *path) {
                         bool isLink = UTIL_isLink(path);
                         if (isLink && verbosity >= 2) {
@@ -332,7 +332,7 @@ Options::Status Options::parse(int argc, const char **argv) {
                                     path);
                         }
                         return isLink;
-                    });
+                                        }), localInputFiles.end());
   }
 
   // Translate input files/directories into files to (de)compress