diff options
| author | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-01 23:21:56 +0900 |
|---|---|---|
| committer | Tatsuhiro Tsujikawa <tatsuhiro.t@gmail.com> | 2011-12-01 23:21:56 +0900 |
| commit | 82e5318e357154e04d5a211eaa8de7915bc93f5b (patch) | |
| tree | 5b2994ecbc0c8f5874b3a018516a91917c5f5356 | |
| parent | b89bc8a6cb3b93997647ceefc5b17bf05f20a0d0 (diff) | |
Fixed compile error with mingw
| -rw-r--r-- | src/option_processing.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/option_processing.cc b/src/option_processing.cc index 0e938c07..b9872377 100644 --- a/src/option_processing.cc +++ b/src/option_processing.cc @@ -182,10 +182,10 @@ void option_processing(Option& op, std::vector<std::string>& uris, // finaly let's parse and store command-iine options. oparser->parse(op, cmdstream); #ifdef __MINGW32__ - for(std::map<std::string, std::string>::iterator i = op.begin(); - i != op.end(); ++i) { - if(!util::isUtf8((*i).second)) { - (*i).second = nativeToUtf8((*i).second); + for(size_t i = 1, len = option::countOption(); i < len; ++i) { + const Pref* pref = option::i2p(i); + if(op.defined(pref) && !util::isUtf8(op.get(pref))) { + op.put(pref, nativeToUtf8(op.get(pref))); } } #endif // __MINGW32__ |
