3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2026-02-01 14:57:57 +00:00

constify a constant

shrinks binary size by 4KB
This commit is contained in:
Nuno Lopes 2026-01-30 15:01:53 +00:00
parent 7edc4e088a
commit 70a03c7784
2 changed files with 3 additions and 9 deletions

View file

@ -133,13 +133,6 @@ mpz_manager<SYNCH>::mpz_manager():
m_allocator("mpz_manager") {
#ifndef _MP_GMP
if (sizeof(digit_t) == sizeof(uint64_t)) {
// 64-bit machine
m_init_cell_capacity = 4;
}
else {
m_init_cell_capacity = 6;
}
set(m_int_min, -static_cast<int64_t>(INT_MIN));
#else
// GMP

View file

@ -159,8 +159,9 @@ class mpz_manager {
mutable mpn_manager m_mpn_manager;
#ifndef _MP_GMP
unsigned m_init_cell_capacity;
mpz m_int_min;
// 64-bit machine?
static const unsigned m_init_cell_capacity = sizeof(digit_t) == sizeof(uint64_t) ? 4 : 6;
mpz m_int_min;
static unsigned cell_size(unsigned capacity) {
return sizeof(mpz_cell) + sizeof(digit_t) * capacity;