Commit 70d462b3 authored by pxli168's avatar pxli168

Simplify the code

Simplify the code as @SpecLad suggested.
parent 203a9acd
......@@ -65,8 +65,7 @@ static void from_str(const String& str, int type, void* dst)
{
std::string temp;
ss >> temp;
if( !temp.compare("true") ) *(bool*)dst = true;
else *(bool*)dst = false;
*(bool*) = temp == "true";
}
else if( type == Param::UNSIGNED_INT )
ss >> *(unsigned*)dst;
......
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