Commit 3782c324 authored by Roman Donchenko's avatar Roman Donchenko Committed by OpenCV Buildbot

Merge pull request #2098 from pxli168:patch-1

parents edbff688 44ecb727
......@@ -41,6 +41,8 @@ static String get_type_name(int type)
{
if( type == Param::INT )
return "int";
if( type == Param::BOOLEAN )
return "bool";
if( type == Param::UNSIGNED_INT )
return "unsigned";
if( type == Param::UINT64 )
......@@ -59,6 +61,12 @@ static void from_str(const String& str, int type, void* dst)
std::stringstream ss(str.c_str());
if( type == Param::INT )
ss >> *(int*)dst;
else if( type == Param::BOOLEAN )
{
std::string temp;
ss >> temp;
*(bool*) dst = temp == "true";
}
else if( type == Param::UNSIGNED_INT )
ss >> *(unsigned*)dst;
else if( type == Param::UINT64 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment