mirror of
https://github.com/Z3Prover/z3
synced 2026-03-17 10:33:48 +00:00
fix
This commit is contained in:
parent
0a22332196
commit
bd993ca963
3 changed files with 19 additions and 3 deletions
|
|
@ -159,6 +159,14 @@ public:
|
|||
SASSERT(fits_in_small(v));
|
||||
}
|
||||
|
||||
mpz(int v) noexcept : m_value(static_cast<uintptr_t>(v) << 1) {
|
||||
SASSERT(fits_in_small(v));
|
||||
}
|
||||
|
||||
mpz(unsigned v) noexcept : m_value(static_cast<uintptr_t>(v) << 1) {
|
||||
SASSERT(fits_in_small(v));
|
||||
}
|
||||
|
||||
mpz(mpz_type* ptr) noexcept {
|
||||
set_ptr(ptr, false, true); // external pointer, non-negative
|
||||
}
|
||||
|
|
@ -600,6 +608,9 @@ public:
|
|||
|
||||
void set(mpz & a, char const * val);
|
||||
|
||||
void set(mpz & a, int val) { set(a, (int64_t)val); }
|
||||
void set(mpz & a, unsigned val) { set(a, (uint64_t)val); }
|
||||
|
||||
void set(mpz & a, int64_t val) {
|
||||
if (mpz::fits_in_small(val) && is_small(a)) {
|
||||
a.set(val);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue