Commit 13ce79fd authored by Kenneth Leiter's avatar Kenneth Leiter

ENH: Fix up some minor const-correctness issues.

parent c4b66df6
......@@ -26,7 +26,7 @@ public:
class XdmfArray::CopyArrayValues : public boost::static_visitor <void> {
public:
CopyArrayValues(int startIndex, int valuesStartIndex, int numValues, int arrayStride, int valuesStride) :
CopyArrayValues(const int startIndex, const int valuesStartIndex, const int numValues, const int arrayStride, const int valuesStride) :
mStartIndex(startIndex),
mValuesStartIndex(valuesStartIndex),
mNumValues(numValues),
......@@ -55,11 +55,11 @@ public:
private:
int mStartIndex;
int mValuesStartIndex;
int mNumValues;
int mArrayStride;
int mValuesStride;
const int mStartIndex;
const int mValuesStartIndex;
const int mNumValues;
const int mArrayStride;
const int mValuesStride;
};
class XdmfArray::GetHDF5Type : public boost::static_visitor <hid_t> {
......
......@@ -57,7 +57,7 @@ public:
* @param arrayStride number of values to stride in this array between each copy.
* @param valuesStride number of values to stride in the XdmfArray between each copy.
*/
void copyValues(int startIndex, boost::shared_ptr<XdmfArray> values, int valuesStartIndex= 0, int numValues = 1, int arrayStride = 1, int valuesStride = 1);
void copyValues(const int startIndex, const boost::shared_ptr<XdmfArray> values, const int valuesStartIndex= 0, const int numValues = 1, const int arrayStride = 1, const int valuesStride = 1);
/**
* Copy values from an array into this array.
......@@ -69,7 +69,7 @@ public:
* @param valuesStride number of values to stride in the pointer between each copy.
*/
template<typename T>
void copyValues(int startIndex, T * valuesPointer, int numValues = 1, int arrayStride = 1, int valuesStride = 1);
void copyValues(const int startIndex, const T * const valuesPointer, const int numValues = 1, const int arrayStride = 1, const int valuesStride = 1);
/**
* Remove all values from this array
......
......@@ -5,7 +5,7 @@ template<typename T>
class XdmfArray::CopyValues : public boost::static_visitor <void> {
public:
CopyValues(int startIndex, T * valuesPointer, int numValues = 1, int arrayStride = 1, int valuesStride = 1) :
CopyValues(const int startIndex, const T * const valuesPointer, const int numValues, const int arrayStride, const int valuesStride) :
mStartIndex(startIndex),
mValuesPointer(valuesPointer),
mNumValues(numValues),
......@@ -34,11 +34,11 @@ public:
private:
int mStartIndex;
T* mValuesPointer;
int mNumValues;
int mArrayStride;
int mValuesStride;
const int mStartIndex;
const T * const mValuesPointer;
const int mNumValues;
const int mArrayStride;
const int mValuesStride;
};
struct XdmfArray::NullDeleter
......@@ -49,7 +49,7 @@ struct XdmfArray::NullDeleter
};
template<typename T>
void XdmfArray::copyValues(int startIndex, T * valuesPointer, int numValues, int arrayStride, int valuesStride)
void XdmfArray::copyValues(const int startIndex, const T * const valuesPointer, const int numValues, const int arrayStride, const int valuesStride)
{
if(!mInitialized)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment