little fix in command line parser - catch unknown parameter types
This commit is contained in:
@@ -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())
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user