3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-03-18 19:14:29 +00:00

Store rational by value in parameter variant (#8518)

Co-authored-by: nunoplopes <2998477+nunoplopes@users.noreply.github.com>
This commit is contained in:
Copilot 2026-02-08 12:17:13 +00:00 committed by Nikolaj Bjorner
parent e73c897bd4
commit 3a8b688008
2 changed files with 4 additions and 10 deletions

View file

@ -41,18 +41,12 @@ Revision History:
// -----------------------------------
parameter::~parameter() {
if (auto p = std::get_if<rational*>(&m_val)) {
dealloc(*p);
}
if (auto p = std::get_if<zstring*>(&m_val)) {
dealloc(*p);
}
}
parameter::parameter(parameter const& other) : m_val(other.m_val) {
if (auto p = std::get_if<rational*>(&m_val)) {
m_val = alloc(rational, **p);
}
if (auto p = std::get_if<zstring*>(&m_val)) {
m_val = alloc(zstring, **p);
}