Skip to content

Commit dc4f1e7

Browse files
committed
cppcheck
1 parent 9f7c74b commit dc4f1e7

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

libsrc/eclib/bigrat.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,12 @@ class bigrational {
3232
public:
3333
// constructors
3434
bigrational() : n(0), d(1) {;}
35-
bigrational(const bigint& num_val) : n(num_val), d(1) {;}
35+
explicit bigrational(const bigint& num_val) : n(num_val), d(1) {;}
3636
bigrational(const bigint& num_val, const bigint& den_val);
3737
bigrational(const bigrational& q);
3838
explicit bigrational(const rational& q);
3939
void operator=(const bigrational& q);
40+
void operator=(const bigint& a);
4041
void operator=(const rational& q);
4142

4243
// bigrational manipulations
@@ -103,6 +104,7 @@ inline bigrational::bigrational(const bigint& num_val, const bigint& den_val)
103104
inline bigrational::bigrational(const bigrational& q) :n(q.n), d(q.d) {;}
104105
inline bigrational::bigrational(const rational& q) :n(q.n), d(q.d) {;}
105106
inline void bigrational::operator=(const bigrational& q) {n=q.n; d=q.d;}
107+
inline void bigrational::operator=(const bigint& a) {n=a; d=bigint(1);}
106108
inline void bigrational::operator=(const rational& q) {n=bigint(q.n); d=bigint(q.d);}
107109

108110
inline bigrational bigrational::operator+()

libsrc/points.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ vector<Point> m_torsion(Curvedata& E, long m, int exact)
482482
// accumulate the points with each x-coorindate:
483483
for( const auto& xi : xs)
484484
{
485-
vector<Point> Ps = points_from_x(E, xi);
485+
vector<Point> Ps = points_from_x(E, bigrational(xi));
486486
#ifdef DEBUG_TORSION
487487
cout<<" x = "<<xi<< " gives points "<<Ps<<" of order dividing "<<m<<": "<<Ps<<"\n";
488488
#endif

0 commit comments

Comments
 (0)