Export correctly the const-ness of saveArray
This commit is contained in:
parent
9ae42a2442
commit
bba009ef42
@ -218,7 +218,7 @@ namespace CosmoTool
|
||||
|
||||
template<typename T>
|
||||
void saveArray(const std::string& fname,
|
||||
T *array, uint32_t *dimList, uint32_t rank);
|
||||
const T *array, uint32_t *dimList, uint32_t rank);
|
||||
|
||||
template<typename T>
|
||||
void loadArray(const std::string& fname,
|
||||
|
@ -235,7 +235,7 @@ namespace CosmoTool {
|
||||
|
||||
template<typename T>
|
||||
void saveArray(const std::string& fname,
|
||||
T *array, uint32_t *dimList, uint32_t rank)
|
||||
const T *array, uint32_t *dimList, uint32_t rank)
|
||||
{
|
||||
NcFile f(fname.c_str(), NcFile::Replace, 0, 0, NcFile::Netcdf4);
|
||||
|
||||
@ -300,10 +300,10 @@ namespace CosmoTool {
|
||||
double*& array, uint32_t *&dimList, uint32_t& rank);
|
||||
|
||||
template void saveArray<int>(const std::string& fname,
|
||||
int *array, uint32_t *dimList, uint32_t rank);
|
||||
const int *array, uint32_t *dimList, uint32_t rank);
|
||||
template void saveArray<float>(const std::string& fname,
|
||||
float *array, uint32_t *dimList, uint32_t rank);
|
||||
const float *array, uint32_t *dimList, uint32_t rank);
|
||||
template void saveArray<double>(const std::string& fname,
|
||||
double *array, uint32_t *dimList, uint32_t rank);
|
||||
const double *array, uint32_t *dimList, uint32_t rank);
|
||||
|
||||
}
|
||||
|
@ -203,7 +203,7 @@ namespace CosmoTool {
|
||||
|
||||
template<typename T>
|
||||
void saveArray(const std::string& fname,
|
||||
T *array, uint32_t *dimList, uint32_t rank)
|
||||
const T *array, uint32_t *dimList, uint32_t rank)
|
||||
{
|
||||
NcFile f(fname.c_str(), NcFile::replace);
|
||||
|
||||
@ -263,10 +263,10 @@ namespace CosmoTool {
|
||||
double*& array, uint32_t *&dimList, uint32_t& rank);
|
||||
|
||||
template void saveArray<int>(const std::string& fname,
|
||||
int *array, uint32_t *dimList, uint32_t rank);
|
||||
const int *array, uint32_t *dimList, uint32_t rank);
|
||||
template void saveArray<float>(const std::string& fname,
|
||||
float *array, uint32_t *dimList, uint32_t rank);
|
||||
const float *array, uint32_t *dimList, uint32_t rank);
|
||||
template void saveArray<double>(const std::string& fname,
|
||||
double *array, uint32_t *dimList, uint32_t rank);
|
||||
const double *array, uint32_t *dimList, uint32_t rank);
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user