little fix in command line parser - catch unknown parameter types

pull/31/head
Vadim Pisarevsky 12 years ago
parent 0598f33a85
commit 7c13dc6cb3
  1. 2
      modules/core/src/command_line_parser.cpp

@ -71,6 +71,8 @@ static void from_str(const string& str, int type, void* dst)
ss >> *(double*)dst; ss >> *(double*)dst;
else if( type == Param::STRING ) else if( type == Param::STRING )
ss >> *(string*)dst; ss >> *(string*)dst;
else
CV_Error(CV_StsBadArg, "unknown/unsupported parameter type");
if (ss.fail()) if (ss.fail())
{ {

Loading…
Cancel
Save