~ubuntu-branches/ubuntu/trusty/aria2/trusty-proposed

« back to all changes in this revision

Viewing changes to src/option_processing.cc

  • Committer: Package Import Robot
  • Author(s): Kartik Mistry
  • Date: 2013-12-16 18:41:03 UTC
  • mfrom: (2.5.21 sid)
  • Revision ID: package-import@ubuntu.com-20131216184103-xzah3019zwut429g
Tags: 1.18.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
void overrideWithEnv
76
76
(Option& op,
77
77
 const std::shared_ptr<OptionParser>& optionParser,
78
 
 const Pref* pref,
 
78
 PrefPtr pref,
79
79
 const std::string& envName)
80
80
{
81
81
  char* value = getenv(envName.c_str());
139
139
    return;
140
140
  }
141
141
  int optstrlen = strlen(optstr);
142
 
  std::vector<std::pair<int, const Pref*> > cands;
 
142
  std::vector<std::pair<int, PrefPtr> > cands;
143
143
  for(int i = 1, len = option::countOption(); i < len; ++i) {
144
 
    const Pref* pref = option::i2p(i);
 
144
    PrefPtr pref = option::i2p(i);
145
145
    const OptionHandler* h = parser->find(pref);
146
146
    if(!h || h->isHidden()) {
147
147
      continue;
181
181
void optionNativeToUtf8(Option& op)
182
182
{
183
183
  for(size_t i = 1, len = option::countOption(); i < len; ++i) {
184
 
    const Pref* pref = option::i2p(i);
 
184
    PrefPtr pref = option::i2p(i);
185
185
    if(op.definedLocal(pref) && !util::isUtf8(op.get(pref))) {
186
186
      op.put(pref, nativeToUtf8(op.get(pref)));
187
187
    }