Skip to content
Snippets Groups Projects
Commit f53bd159 authored by Florent Lamiraux's avatar Florent Lamiraux
Browse files

Value::operator== does nothing when a = a.

parent b6fec4bb
No related branches found
No related tags found
No related merge requests found
......@@ -178,10 +178,11 @@ namespace dynamicgraph {
Value Value::operator=(const Value& value)
{
type_ = value.type_;
void** ptValue = const_cast<void**>(&value_);
*ptValue = copyValue(value);
if (&value != this) {
type_ = value.type_;
void** ptValue = const_cast<void**>(&value_);
*ptValue = copyValue(value);
}
return *this;
}
......
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