Skip to content

Commit

Permalink
cppcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCremona committed May 3, 2024
1 parent 9f7c74b commit dc4f1e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion libsrc/eclib/bigrat.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,12 @@ class bigrational {
public:
// constructors
bigrational() : n(0), d(1) {;}
bigrational(const bigint& num_val) : n(num_val), d(1) {;}
explicit bigrational(const bigint& num_val) : n(num_val), d(1) {;}
bigrational(const bigint& num_val, const bigint& den_val);
bigrational(const bigrational& q);
explicit bigrational(const rational& q);
void operator=(const bigrational& q);
void operator=(const bigint& a);
void operator=(const rational& q);

// bigrational manipulations
Expand Down Expand Up @@ -103,6 +104,7 @@ inline bigrational::bigrational(const bigint& num_val, const bigint& den_val)
inline bigrational::bigrational(const bigrational& q) :n(q.n), d(q.d) {;}
inline bigrational::bigrational(const rational& q) :n(q.n), d(q.d) {;}
inline void bigrational::operator=(const bigrational& q) {n=q.n; d=q.d;}
inline void bigrational::operator=(const bigint& a) {n=a; d=bigint(1);}
inline void bigrational::operator=(const rational& q) {n=bigint(q.n); d=bigint(q.d);}

inline bigrational bigrational::operator+()
Expand Down
2 changes: 1 addition & 1 deletion libsrc/points.cc
Original file line number Diff line number Diff line change
Expand Up @@ -482,7 +482,7 @@ vector<Point> m_torsion(Curvedata& E, long m, int exact)
// accumulate the points with each x-coorindate:
for( const auto& xi : xs)
{
vector<Point> Ps = points_from_x(E, xi);
vector<Point> Ps = points_from_x(E, bigrational(xi));
#ifdef DEBUG_TORSION
cout<<" x = "<<xi<< " gives points "<<Ps<<" of order dividing "<<m<<": "<<Ps<<"\n";
#endif
Expand Down

0 comments on commit dc4f1e7

Please sign in to comment.