The previous implementation assigned the value to a temporary variable
and then return it without assigning it to 'this'. That is not only
contradictory to user's expectation but also cppcheck treats it as a
logic error.
Signed-off-by: Daiki Ueno <ueno@gnu.org>
throw (exception (ret));
}
- return *dst;
+ std::swap (this->params, dst->params);
+ delete dst;
+
+ return *this;
}
// RSA
throw (exception (ret));
}
- return *dst;
+ std::swap (this->params, dst->params);
+ delete dst;
+
+ return *this;
}
void rsa_params::import_raw (const gnutls_datum_t & m,