mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +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);
|
v = impl->cat_string(v);
|
||||||
|
|
||||||
// it is an error if we just got the default value here
|
// it is an error if we just got the default value here
|
||||||
if(v.empty())
|
if (v.empty() && type != Param::STRING)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
from_str(v, type, dst);
|
from_str(v, type, dst);
|
||||||
|
Loading…
Reference in New Issue
Block a user