X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fgmpint.h;h=6ed5303c546b29178a0373f13d0b24f044fe0d7b;hp=4f45231802ba84af50d88a9db5486cf5fd24bb57;hb=6dd539966821debd18e0b86ed126742cd81d7fc9;hpb=85e08223a33439f9b4911129b48ee45ff65869eb diff --git a/src/gmpint.h b/src/gmpint.h index 4f45231..6ed5303 100644 --- a/src/gmpint.h +++ b/src/gmpint.h @@ -15,8 +15,7 @@ class Gmpint Gmpint(int64_t i) {mpz_init_set_si(m_op, i);} Gmpint(const std::string & str, int base=10) {mpz_init_set_str(m_op, str.c_str(), base);} Gmpint(const Gmpint & cpy) {mpz_init(m_op); mpz_set(m_op, cpy.m_op);} - virtual ~Gmpint() {} //TODO: Do we need to delete m_op somehow? - + virtual ~Gmpint() {mpz_clear(m_op);} operator int64_t() const {return mpz_get_si(m_op);} operator uint64_t() const {return mpz_get_ui(m_op);} @@ -55,7 +54,6 @@ class Gmpint private: - Gmpint(const mpz_t & op) : m_op(op) {} mpz_t m_op; };