diff --git a/src/hdf5_array.hpp b/src/hdf5_array.hpp index c15c499..43c5221 100644 --- a/src/hdf5_array.hpp +++ b/src/hdf5_array.hpp @@ -286,7 +286,7 @@ namespace CosmoTool { template void hdf5_check_array(ArrayType& data, std::vector& dims) { - for (long i = 0; i < data.num_dimensions(); i++) { + for (size_t i = 0; i < data.num_dimensions(); i++) { if (data.shape()[i] != dims[i]) { throw InvalidDimensions(); } @@ -295,7 +295,7 @@ namespace CosmoTool { template void hdf5_weak_check_array(ArrayType& data, std::vector& dims) { - for (long i = 0; i < data.num_dimensions(); i++) { + for (size_t i = 0; i < data.num_dimensions(); i++) { if (data.index_bases()[i] < 0) { // Negative indexes are not supported right now. throw InvalidDimensions();