From: Daniel Garcia-Sanchez Date: Thu, 22 Nov 2018 17:39:07 +0000 (+0100) Subject: Make the arguments const X-Git-Tag: v9.1.0-rc1~453^2~8 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c810bc847f5e419b51200b41cf8f2e3d6c865d5;p=dealii.git Make the arguments const --- diff --git a/include/deal.II/base/hdf5.h b/include/deal.II/base/hdf5.h index cf3a3b29d0..5af0178366 100644 --- a/include/deal.II/base/hdf5.h +++ b/include/deal.II/base/hdf5.h @@ -857,7 +857,7 @@ namespace HDF5 * This function sets the boolean query_io_mode. */ void - set_query_io_mode(bool query_io_mode); + set_query_io_mode(const bool query_io_mode); /** * This function returns the dimensions of the dataset. The vector diff --git a/source/base/hdf5.cc b/source/base/hdf5.cc index 6e3b2817e5..8885254d33 100644 --- a/source/base/hdf5.cc +++ b/source/base/hdf5.cc @@ -193,7 +193,7 @@ namespace HDF5 std::is_same>::value, Container>::type - initialize_container(std::vector dimensions) + initialize_container(const std::vector dimensions) { return Container(std::accumulate( dimensions.begin(), dimensions.end(), 1, std::multiplies())); @@ -205,7 +205,7 @@ namespace HDF5 typename std::enable_if< std::is_same>::value, Container>::type - initialize_container(std::vector dimensions) + initialize_container(const std::vector dimensions) { return Container(std::accumulate( dimensions.begin(), dimensions.end(), 1, std::multiplies())); @@ -218,7 +218,7 @@ namespace HDF5 std::is_same>::value, Container>::type - initialize_container(std::vector dimensions) + initialize_container(const std::vector dimensions) { // If the rank is higher than 2, then remove single-dimensional entries // from the shape defined by dimensions. This is equivalent to the squeeze @@ -228,7 +228,7 @@ namespace HDF5 if (dimensions.size() > 2) { - for (auto &&dimension : dimensions) + for (const auto &dimension : dimensions) { if (dimension > 1) squeezed_dimensions.push_back(dimension); @@ -247,7 +247,7 @@ namespace HDF5 // Convert a HDF5 no_collective_cause code to a human readable string std::string - no_collective_cause_to_string(uint32_t no_collective_cause) + no_collective_cause_to_string(const uint32_t no_collective_cause) { std::string message; @@ -1349,7 +1349,7 @@ namespace HDF5 void - DataSet::set_query_io_mode(bool new_query_io_mode) + DataSet::set_query_io_mode(const bool new_query_io_mode) { query_io_mode = new_query_io_mode; }