mirror of
https://github.com/Z3Prover/z3
synced 2026-06-02 23:27:53 +00:00
constify a constant
shrinks binary size by 4KB
This commit is contained in:
parent
7edc4e088a
commit
70a03c7784
2 changed files with 3 additions and 9 deletions
|
|
@ -133,13 +133,6 @@ mpz_manager<SYNCH>::mpz_manager():
|
||||||
m_allocator("mpz_manager") {
|
m_allocator("mpz_manager") {
|
||||||
|
|
||||||
#ifndef _MP_GMP
|
#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));
|
set(m_int_min, -static_cast<int64_t>(INT_MIN));
|
||||||
#else
|
#else
|
||||||
// GMP
|
// GMP
|
||||||
|
|
|
||||||
|
|
@ -159,8 +159,9 @@ class mpz_manager {
|
||||||
mutable mpn_manager m_mpn_manager;
|
mutable mpn_manager m_mpn_manager;
|
||||||
|
|
||||||
#ifndef _MP_GMP
|
#ifndef _MP_GMP
|
||||||
unsigned m_init_cell_capacity;
|
// 64-bit machine?
|
||||||
mpz m_int_min;
|
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) {
|
static unsigned cell_size(unsigned capacity) {
|
||||||
return sizeof(mpz_cell) + sizeof(digit_t) * capacity;
|
return sizeof(mpz_cell) + sizeof(digit_t) * capacity;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue