Skip to content

Commit

Permalink
A couple more assert -> xassert and avoid using assert.h
Browse files Browse the repository at this point in the history
  • Loading branch information
rmjarvis committed May 12, 2020
1 parent d54b26c commit 9871a12
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions include/galsim/Laguerre.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ namespace galsim {
int m() const { return p-q; }
PQIndex& setNm(const int N, const int m)
{
assert(std::abs(m)<=N && (N-m)%2==0);
xassert(std::abs(m)<=N && (N-m)%2==0);
p=(N+m)/2;
q=(N-m)/2;
return *this;
Expand Down Expand Up @@ -234,7 +234,7 @@ namespace galsim {
{
allocateMem();
*_v = v;
assert(v.size() == PQIndex::size(order));
xassert(v.size() == PQIndex::size(order));
}

LVector(const LVector& rhs) : _order(rhs._order), _v(rhs._v) {}
Expand Down
2 changes: 1 addition & 1 deletion src/math/BesselI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include <cmath>
#include <cstdlib>
#include <stdexcept>
#include <assert.h>
#include <limits>
#include <algorithm>

#include "math/Gamma.h"
#include "Std.h"

// The functions in this file and the other Bessel?.cpp files are manual conversions from the
// public domain fortran code here:
Expand Down
2 changes: 1 addition & 1 deletion src/math/BesselJ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include <cmath>
#include <cstdlib>
#include <stdexcept>
#include <assert.h>
#include <limits>
#include <algorithm>

#include "math/Gamma.h"
#include "Std.h"

// The functions in this file and the other Bessel?.cpp files are manual conversions from the
// public domain fortran code here:
Expand Down
2 changes: 1 addition & 1 deletion src/math/BesselK.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include <cmath>
#include <cstdlib>
#include <stdexcept>
#include <assert.h>
#include <limits>
#include <algorithm>

#include "math/Gamma.h"
#include "Std.h"

// The functions in this file and the other Bessel?.cpp files are manual conversions from the
// public domain fortran code here:
Expand Down
2 changes: 1 addition & 1 deletion src/math/BesselY.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@
#include <cmath>
#include <cstdlib>
#include <stdexcept>
#include <assert.h>
#include <limits>
#include <algorithm>

#include "math/Gamma.h"
#include "Std.h"

// The functions in this file and the other Bessel?.cpp files are manual conversions from the
// public domain fortran code here:
Expand Down
2 changes: 1 addition & 1 deletion src/math/Gamma.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
#include <cmath>
#include <limits>

#include "Std.h"
#include "math/Gamma.h"
#include "Std.h"

//#define TEST // Uncomment this to turn on testing of this code against boost code.
// It does some additional testing beyond just what we get from the SBSersic
Expand Down

0 comments on commit 9871a12

Please sign in to comment.