Skip to content
Snippets Groups Projects
Commit 0936e1ca authored by Nicolas Mansard's avatar Nicolas Mansard
Browse files

Corrected a warning uninitialized value.

parent 8fca0b1a
No related branches found
No related tags found
No related merge requests found
......@@ -222,21 +222,21 @@ namespace dynamicgraph {
float Value::floatValue() const
{
float result;
if(type_ == FLOAT)
result = *((float*)value_);
if(FLOAT != type_)
throw ExceptionAbstract(ExceptionAbstract::TOOLS,
"value is not a float");
result = *((float*)value_);
return result;
throw ExceptionAbstract(ExceptionAbstract::TOOLS,
"value is not a float");
}
double Value::doubleValue() const
{
double result;
if(type_ == DOUBLE)
result = *((double*)value_);
if(DOUBLE != type_)
throw ExceptionAbstract(ExceptionAbstract::TOOLS,
"value is not a double");
result = *((double*)value_);
return result;
throw ExceptionAbstract(ExceptionAbstract::TOOLS,
"value is not a double");
}
std::string Value::stringValue() const
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment