summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/CommandLineArguments.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-10 17:10:09 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-12-10 17:10:09 (GMT)
commit5e56c7c201a60a8a63b4a5c3ba8c622bcf1a55ab (patch)
treef41472417d375f6d2fa52c0f6826247c70f074c5 /Source/kwsys/CommandLineArguments.cxx
parent5999a81bcdd22f206255fa209e2c211bce88555b (diff)
downloadCMake-5e56c7c201a60a8a63b4a5c3ba8c622bcf1a55ab.zip
CMake-5e56c7c201a60a8a63b4a5c3ba8c622bcf1a55ab.tar.gz
CMake-5e56c7c201a60a8a63b4a5c3ba8c622bcf1a55ab.tar.bz2
ENH: Add a method to remove remaining arguments
Diffstat (limited to 'Source/kwsys/CommandLineArguments.cxx')
-rw-r--r--Source/kwsys/CommandLineArguments.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx
index e0d0edc..b84c9b7 100644
--- a/Source/kwsys/CommandLineArguments.cxx
+++ b/Source/kwsys/CommandLineArguments.cxx
@@ -359,6 +359,17 @@ void CommandLineArguments::GetRemainingArguments(int* argc, char*** argv)
}
//----------------------------------------------------------------------------
+void CommandLineArguments::DeleteRemainingArguments(int argc, char*** argv)
+{
+ int cc;
+ for ( cc = 0; cc < argc; ++ cc )
+ {
+ delete [] *argv[cc];
+ }
+ delete [] *argv;
+}
+
+//----------------------------------------------------------------------------
void CommandLineArguments::AddCallback(const char* argument, ArgumentTypeEnum type,
CallbackType callback, void* call_data, const char* help)
{