Skip to content

Commit

Permalink
Update Int.h
Browse files Browse the repository at this point in the history
  • Loading branch information
marekpiotrow authored Nov 3, 2021
1 parent 3173c59 commit 139aa25
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ADTs/Int.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,19 +134,19 @@ class Int {
public:
// Constructors/Destructor (+assignment operator)
//
Int(mpz_t* d) : data(d) {} // Low-level constructor -- don't use!
explicit Int(mpz_t* d) : data(d) {} // Low-level constructor -- don't use!

Int() {
data = xmalloc<mpz_t>(1); assert(((intp)data & 1) == 0);
mpz_init(*data);
}

Int(int x) {
explicit Int(int x) {
data = xmalloc<mpz_t>(1); assert(((intp)data & 1) == 0);
mpz_init_set_si(*data, x);
}

explicit Int(int64_t x) {
Int(int64_t x) {
data = xmalloc<mpz_t>(1); assert(((intp)data & 1) == 0);
mpz_init_set_si(*data, x);
}
Expand Down

0 comments on commit 139aa25

Please sign in to comment.