Export correctly the const-ness of saveArray

This commit is contained in:
Guilhem Lavaux 2014-04-02 16:53:14 +02:00
parent 9ae42a2442
commit bba009ef42
3 changed files with 9 additions and 9 deletions

View File

@ -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,

View File

@ -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);
}

View File

@ -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);
}