aboutsummaryrefslogtreecommitdiffstats
path: root/support
diff options
context:
space:
mode:
Diffstat (limited to 'support')
-rw-r--r--support/lib/Support/ProgramOptions.cpp18
1 files changed, 8 insertions, 10 deletions
diff --git a/support/lib/Support/ProgramOptions.cpp b/support/lib/Support/ProgramOptions.cpp
index 40fa5ac..c9df10a 100644
--- a/support/lib/Support/ProgramOptions.cpp
+++ b/support/lib/Support/ProgramOptions.cpp
@@ -109,20 +109,20 @@ ProgramOptions::GetOriginalArgs() const
return argv;
}
-vector<char*>
+vector<string>
ProgramOptions::GetDescription() const
{
- vector<char*> optDesc;
+ vector<string> optDesc;
if (optDesc.size() < (unsigned) argc)
{
- for (StringMap<ProgramOption*>::const_iterator iter=optionRegistry.begin();
+ for (hash_map<string,ProgramOption*>::const_iterator iter=optionRegistry.begin();
! (iter == optionRegistry.end());
++iter)
{
- const ProgramOption* handler = (*iter).second;
- optDesc.push_back(strdup(handler->ArgString())); // 1st
- optDesc.push_back(strdup(handler->HelpMesg())); // 2nd
+ const ProgramOption* handler = iter->second;
+ optDesc.push_back(handler->ArgString()); // 1st
+ optDesc.push_back(handler->HelpMesg()); // 2nd
optDesc.push_back(handler->GetTextValue()); // 3rd
}
}
@@ -215,10 +215,8 @@ ProgramOptions::PrintOptions(ostream& stream) const
stream << "\tUse argument 0 to turn OFF a flag option: "
<< "-<flag_opt> 0" << endl << endl;
- for (StringMap<ProgramOption*>::const_iterator iter=optionRegistry.begin();
- ! (iter == optionRegistry.end());
- ++iter)
- {
+ for (hash_map<string,ProgramOption*>::const_iterator iter = optionRegistry.begin();
+ iter != optionRegistry.end(); ++iter) {
const ProgramOption* handler = (*iter).second;
stream << "\t-" << handler->ArgString();