浏览代码

VS: Add method to clear flag tables of option parser

Brad King 8 年之前
父节点
当前提交
a05fc93ee6
共有 2 个文件被更改,包括 10 次插入0 次删除
  1. 7 0
      Source/cmVisualStudioGeneratorOptions.cxx
  2. 3 0
      Source/cmVisualStudioGeneratorOptions.h

+ 7 - 0
Source/cmVisualStudioGeneratorOptions.cxx

@@ -81,6 +81,13 @@ void cmVisualStudioGeneratorOptions::AddTable(cmVS7FlagTable const* table)
   }
 }
 
+void cmVisualStudioGeneratorOptions::ClearTables()
+{
+  for (int i = 0; i < FlagTableCount; ++i) {
+    this->FlagTable[i] = CM_NULLPTR;
+  }
+}
+
 void cmVisualStudioGeneratorOptions::FixExceptionHandlingDefault()
 {
   // Exception handling is on by default because the platform file has

+ 3 - 0
Source/cmVisualStudioGeneratorOptions.h

@@ -43,6 +43,9 @@ public:
   // Add a table of flags.
   void AddTable(cmVS7FlagTable const* table);
 
+  // Clear the flag tables.
+  void ClearTables();
+
   // Store options from command line flags.
   void Parse(const char* flags);
   void ParseFinish();