Skip to content

Commit

Permalink
Avoid warning with -Wpedantic
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidAce committed Jun 5, 2021
1 parent 85090d9 commit f7ae546
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions include/h5pp/details/h5ppHdf5.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,11 @@ namespace h5pp::hdf5 {
std::array<unsigned int, 1> cdval = {0};
std::array<size_t, 1> cdelm = {0};
for(int idx = 0; idx < nfilter; idx++) {
constexpr size_t size = 10;
filter = H5Pget_filter(dsetCreatePropertyList, idx, nullptr, cdelm.data(), cdval.data(), 0, nullptr, nullptr);
if(filter != H5Z_FILTER_DEFLATE) continue;
H5Pget_filter_by_id(dsetCreatePropertyList, filter, nullptr, cdelm.data(), cdval.data(), 0, nullptr, nullptr);
}
return cdval[0];
return static_cast<int>(cdval[0]);
}

[[nodiscard]] inline std::optional<std::vector<hsize_t>> getMaxDimensions(const hid::h5s &space, H5D_layout_t layout) {
Expand Down
2 changes: 1 addition & 1 deletion include/h5pp/details/h5ppInitListType.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ namespace h5pp {
static_assert(h5pp::type::sfinae::invalid_type_v<U>, "Unrecognized text list type");
throw std::runtime_error(h5pp::format("Could not identify text list type: {}", h5pp::type::sfinae::type_name<U>()));
}
};
}
template<typename U, typename = std::enable_if_t<h5pp::type::sfinae::is_text_v<U>>>
Names(std::initializer_list<U> &&il) : data(il) {}
operator std::vector<std::string> &() { return data; }
Expand Down

0 comments on commit f7ae546

Please sign in to comment.