Skip to content

Commit

Permalink
Merge pull request #3166 from sloriot/Core-bigfloat_from_ui
Browse files Browse the repository at this point in the history
Add missing constructor for unsigned int
  • Loading branch information
lrineau committed Jun 14, 2018
2 parents 1378e30 + 7511b3e commit 2d7dcb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CGAL_Core/include/CGAL/CORE/BigFloat.h
Expand Up @@ -61,6 +61,8 @@ class CGAL_CORE_EXPORT BigFloat : public RCBigFloat {
BigFloat(float i) : RCBigFloat(new BigFloatRep(i)) {}
/// constructor for <tt>int</tt>
BigFloat(int i) : RCBigFloat(new BigFloatRep(i)) {}
/// constructor for <tt>unsigned int</tt>
BigFloat(unsigned int i) : RCBigFloat(new BigFloatRep(i)) {}
/// constructor for <tt>long</tt>
BigFloat(long l) : RCBigFloat(new BigFloatRep(l)) {}
/// constructor for <tt>double</tt>
Expand Down
4 changes: 4 additions & 0 deletions CGAL_Core/include/CGAL/CORE/BigFloatRep.h
Expand Up @@ -71,6 +71,7 @@ class CGAL_CORE_EXPORT BigFloatRep : public RCRepImpl<BigFloatRep> {
public:
// constructors
BigFloatRep(int=0); //inline
BigFloatRep(unsigned int); //inline
BigFloatRep(short); //inline
BigFloatRep(float); //inline
BigFloatRep(long); //inline
Expand Down Expand Up @@ -249,6 +250,9 @@ inline BigFloatRep::BigFloatRep(float n)
inline BigFloatRep::BigFloatRep(int n)
: m(n), err(0), exp(0) {}

inline BigFloatRep::BigFloatRep(unsigned int n)
: m(n), err(0), exp(0) {}

// Chee (8/8/04) -- introduced constructor from long
inline BigFloatRep::BigFloatRep(long n)
: m(n), err(0), exp(0) {}
Expand Down

0 comments on commit 2d7dcb0

Please sign in to comment.