From 82e5318e357154e04d5a211eaa8de7915bc93f5b Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Thu, 1 Dec 2011 23:21:56 +0900 Subject: [PATCH] Fixed compile error with mingw --- src/option_processing.cc | 8 ++++---- 1 file 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& uris, // finaly let's parse and store command-iine options. oparser->parse(op, cmdstream); #ifdef __MINGW32__ - for(std::map::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__