Simplify the code
Simplify the code as @SpecLad suggested.
This commit is contained in:
parent
203a9acdbc
commit
70d462b352
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user