Skip to content

Commit

Permalink
Fix const-ness of some function arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
speth committed Oct 16, 2016
1 parent 8398982 commit 40630a3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions include/cantera/numerics/Func1.h
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ class Gaussian : public Func1
class Poly1 : public Func1
{
public:
Poly1(size_t n, doublereal* c) :
Poly1(size_t n, const double* c) :
Func1() {
m_cpoly.resize(n+1);
std::copy(c, c+m_cpoly.size(), m_cpoly.begin());
Expand Down Expand Up @@ -870,8 +870,8 @@ class Poly1 : public Func1
class Fourier1 : public Func1
{
public:
Fourier1(size_t n, doublereal omega, doublereal a0,
doublereal* a, doublereal* b) :
Fourier1(size_t n, double omega, double a0,
const double* a, const double* b) :
Func1() {
m_omega = omega;
m_a0_2 = 0.5*a0;
Expand Down Expand Up @@ -930,7 +930,7 @@ class Fourier1 : public Func1
class Arrhenius1 : public Func1
{
public:
Arrhenius1(size_t n, doublereal* c) :
Arrhenius1(size_t n, const double* c) :
Func1() {
m_A.resize(n);
m_b.resize(n);
Expand Down
2 changes: 1 addition & 1 deletion include/cantera/oneD/Sim1D.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class Sim1D : public OneDim
return m_x.data();
}

void setTimeStep(doublereal stepsize, size_t n, integer* tsteps);
void setTimeStep(double stepsize, size_t n, const int* tsteps);

void solve(int loglevel = 0, bool refine_grid = true);

Expand Down
2 changes: 1 addition & 1 deletion include/cantera/zeroD/FlowDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class FlowDevice
//! set parameters. Generic function used only in the Matlab interface. From
//! Python or C++, device-specific functions like Valve::setPressureCoeff
//! should be used instead.
virtual void setParameters(int n, doublereal* coeffs) {
virtual void setParameters(int n, const double* coeffs) {
m_coeffs.resize(n);
std::copy(coeffs, coeffs + n, m_coeffs.begin());
}
Expand Down
2 changes: 1 addition & 1 deletion src/oneD/Sim1D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ void Sim1D::finalize()
}
}

void Sim1D::setTimeStep(doublereal stepsize, size_t n, integer* tsteps)
void Sim1D::setTimeStep(double stepsize, size_t n, const int* tsteps)
{
m_tstep = stepsize;
m_steps.resize(n);
Expand Down

0 comments on commit 40630a3

Please sign in to comment.