equal
deleted
inserted
replaced
330 operator double() |
330 operator double() |
331 { |
331 { |
332 Opts::iterator i = _parser._opts.find(_name); |
332 Opts::iterator i = _parser._opts.find(_name); |
333 LEMON_ASSERT(i==_parser._opts.end(), |
333 LEMON_ASSERT(i==_parser._opts.end(), |
334 std::string()+"Unkown option: '"+_name+"'"); |
334 std::string()+"Unkown option: '"+_name+"'"); |
335 LEMON_ASSERT(i->second.type!=ArgParser::DOUBLE, |
335 LEMON_ASSERT(i->second.type!=ArgParser::DOUBLE && |
|
336 i->second.type!=ArgParser::INTEGER, |
336 std::string()+"'"+_name+"' is a floating point option"); |
337 std::string()+"'"+_name+"' is a floating point option"); |
337 return *(i->second.double_p); |
338 return i->second.type==ArgParser::DOUBLE ? |
|
339 *(i->second.double_p) : *(i->second.int_p); |
338 } |
340 } |
339 ///\e |
341 ///\e |
340 operator int() |
342 operator int() |
341 { |
343 { |
342 Opts::iterator i = _parser._opts.find(_name); |
344 Opts::iterator i = _parser._opts.find(_name); |