mirror of
https://github.com/opencv/opencv.git
synced 2024-11-25 03:30:34 +08:00
cmdparser: allow empty strings
This commit is contained in:
parent
12f01b778b
commit
d430e802f2
@ -104,7 +104,7 @@ void CommandLineParser::getByName(const String& name, bool space_delete, int typ
|
||||
v = impl->cat_string(v);
|
||||
|
||||
// it is an error if we just got the default value here
|
||||
if(v.empty())
|
||||
if (v.empty() && type != Param::STRING)
|
||||
break;
|
||||
|
||||
from_str(v, type, dst);
|
||||
|
Loading…
Reference in New Issue
Block a user