|
|
@ -245,6 +245,10 @@ namespace NLMISC
|
|
|
|
|
|
|
|
|
|
|
|
void CVariant::fromString( const std::string &s, EVarType t )
|
|
|
|
void CVariant::fromString( const std::string &s, EVarType t )
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
type = t;
|
|
|
|
|
|
|
|
sval = "";
|
|
|
|
|
|
|
|
std::fill( uvalue.vval, uvalue.vval + VARIANT_VVAL_END, 0.0 );
|
|
|
|
|
|
|
|
|
|
|
|
if( s.empty() )
|
|
|
|
if( s.empty() )
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
|
@ -282,7 +286,6 @@ namespace NLMISC
|
|
|
|
|
|
|
|
|
|
|
|
case Vector4:
|
|
|
|
case Vector4:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::fill( uvalue.vval, uvalue.vval + VARIANT_VVAL_END, 0.0 );
|
|
|
|
|
|
|
|
std::stringstream ss = s;
|
|
|
|
std::stringstream ss = s;
|
|
|
|
|
|
|
|
|
|
|
|
for( int i = 0; i < 4; i++ )
|
|
|
|
for( int i = 0; i < 4; i++ )
|
|
|
@ -297,7 +300,6 @@ namespace NLMISC
|
|
|
|
|
|
|
|
|
|
|
|
case Matrix4:
|
|
|
|
case Matrix4:
|
|
|
|
{
|
|
|
|
{
|
|
|
|
std::fill( uvalue.vval, uvalue.vval + VARIANT_VVAL_END, 0.0 );
|
|
|
|
|
|
|
|
std::stringstream ss = s;
|
|
|
|
std::stringstream ss = s;
|
|
|
|
|
|
|
|
|
|
|
|
for( int i = 0; i < 16; i++ )
|
|
|
|
for( int i = 0; i < 16; i++ )
|
|
|
@ -310,8 +312,6 @@ namespace NLMISC
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
type = t;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|