From 2c810bc847f5e419b51200b41cf8f2e3d6c865d5 Mon Sep 17 00:00:00 2001 From: Daniel Garcia-Sanchez Date: Thu, 22 Nov 2018 18:39:07 +0100 Subject: [PATCH] Make the arguments const --- include/deal.II/base/hdf5.h | 2 +- source/base/hdf5.cc | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) 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; } -- 2.39.5