src/core/command-line.h
changeset 1702 0fbe74581141
parent 630 2f285162b6ca
child 1703 3f808ee49c2f
equal deleted inserted replaced
1701:5e9bd24a8716 1702:0fbe74581141
   121 {
   121 {
   122   std::istringstream iss;
   122   std::istringstream iss;
   123   iss.str (value);
   123   iss.str (value);
   124   T v;
   124   T v;
   125   iss >> v;
   125   iss >> v;
   126   *m_valuePtr = v;
   126   bool ok = (!iss.bad () && !iss.fail ());
   127   return !iss.bad () && !iss.fail ();
   127   if (ok)
       
   128     {
       
   129       *m_valuePtr = v;
       
   130     }
       
   131   return ok;
   128 }
   132 }
   129 template <typename T>
   133 template <typename T>
   130 std::string
   134 std::string
   131 CommandLine::UserDefaultValue<T>::DoGetType (void) const
   135 CommandLine::UserDefaultValue<T>::DoGetType (void) const
   132 {
   136 {
   133   return "";
   137   return TypeNameGet<T> ();
   134 }
   138 }
   135 template <typename T>
   139 template <typename T>
   136 std::string
   140 std::string
   137 CommandLine::UserDefaultValue<T>::DoGetDefaultValue (void) const
   141 CommandLine::UserDefaultValue<T>::DoGetDefaultValue (void) const
   138 {
   142 {