3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-26 02:25:32 +00:00

Drop no-strict-aliasing and fix 2 places where it was violated

This commit is contained in:
Nuno Lopes 2017-08-14 20:09:49 +01:00
parent 07bc19b489
commit 2473c69679
5 changed files with 46 additions and 49 deletions

View file

@ -35,7 +35,7 @@ Revision History:
parameter::~parameter() {
if (m_kind == PARAM_RATIONAL) {
reinterpret_cast<rational *>(m_rational)->~rational();
m_rational.~rational();
}
}
@ -50,14 +50,14 @@ parameter& parameter::operator=(parameter const& other) {
return *this;
}
if (m_kind == PARAM_RATIONAL) {
reinterpret_cast<rational *>(m_rational)->~rational();
m_rational.~rational();
}
m_kind = other.m_kind;
switch(other.m_kind) {
case PARAM_INT: m_int = other.get_int(); break;
case PARAM_AST: m_ast = other.get_ast(); break;
case PARAM_SYMBOL: new (m_symbol) symbol(other.get_symbol()); break;
case PARAM_RATIONAL: new (m_rational) rational(other.get_rational()); break;
case PARAM_SYMBOL: m_symbol = other.get_symbol(); break;
case PARAM_RATIONAL: m_rational = other.get_rational(); break;
case PARAM_DOUBLE: m_dval = other.m_dval; break;
case PARAM_EXTERNAL: m_ext_id = other.m_ext_id; break;
default: