diff options
| author | Nils Maier <maierman@web.de> | 2013-08-25 17:36:53 +0200 |
|---|---|---|
| committer | Nils Maier <maierman@web.de> | 2013-09-19 19:59:33 +0200 |
| commit | a76eeb2b8106dd725097750c3ee4958e505e3c85 (patch) | |
| tree | 3d84a88129aca630dde2b9f03208142d0a981149 /src/OptionParser.cc | |
| parent | 8e6e46dfcfdd269538e6c3070e6eea4b624d74fe (diff) | |
Introduce PrefPtr typedef
Diffstat (limited to 'src/OptionParser.cc')
| -rw-r--r-- | src/OptionParser.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/OptionParser.cc b/src/OptionParser.cc index a1aba666..032f696d 100644 --- a/src/OptionParser.cc +++ b/src/OptionParser.cc @@ -186,7 +186,7 @@ void OptionParser::parseArg // option is ambiguous. int ambiguous = 0; for(int i = 1, len = option::countOption(); i < len; ++i) { - const Pref* pref = option::i2p(i); + PrefPtr pref = option::i2p(i); const OptionHandler* h = find(pref); if(h && !h->isHidden()) { if(strcmp(pref->k, optstr) == 0) { @@ -234,7 +234,7 @@ void OptionParser::parse(Option& option, std::istream& is) const if(nv.first.first == nv.first.second) { continue; } - const Pref* pref = + PrefPtr pref = option::k2p(std::string(nv.first.first, nv.first.second)); const OptionHandler* handler = find(pref); if(handler) { @@ -249,7 +249,7 @@ void OptionParser::parse(Option& option, const KeyVals& options) const { for(KeyVals::const_iterator i = options.begin(), eoi = options.end(); i != eoi; ++i) { - const Pref* pref = option::k2p((*i).first); + PrefPtr pref = option::k2p((*i).first); const OptionHandler* handler = find(pref); if(handler) { handler->parse(option, (*i).second); @@ -325,7 +325,7 @@ std::vector<const OptionHandler*> OptionParser::findAll() const return result; } -const OptionHandler* OptionParser::find(const Pref* pref) const +const OptionHandler* OptionParser::find(PrefPtr pref) const { return findById(pref->i); } |
