瀏覽代碼

cmCommandLineArgument: trim leading empty spaces

Robert Maynard 4 年之前
父節點
當前提交
400536c317
共有 1 個文件被更改,包括 4 次插入0 次删除
  1. 4 0
      Source/cmCommandLineArgument.h

+ 4 - 0
Source/cmCommandLineArgument.h

@@ -110,6 +110,10 @@ struct cmCommandLineArgument
           }
         }
         if (parseState == ParseMode::Valid) {
+          if (possible_value[0] == ' ') {
+            possible_value.remove_prefix(1);
+          }
+
           parseState = this->StoreCall(std::string(possible_value),
                                        std::forward<CallState>(state)...)
             ? ParseMode::Valid