Skip to content

Commit

Permalink
fix typo, fix bug in FlagCollection, and silence a compiler warning (#…
Browse files Browse the repository at this point in the history
…925)

Co-authored-by: Luke Roberts <lfroberts@lanl.gov>
  • Loading branch information
jdolence and lroberts36 authored Aug 17, 2023
1 parent 6f3c5dc commit fb6110c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/interface/metadata.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,9 @@ class Metadata {
FlagCollection(MetadataFlag first, Args... args)
: FlagCollection({first, std::forward<Args>(args)...}, false) {}
// Check if set empty
bool Empty() const { return (unions_.empty() && intersections_.empty()); }
bool Empty() const {
return (unions_.empty() && intersections_.empty() && exclusions_.empty());
}
// Union
template <template <class...> class Container_t, class... extra>
void TakeUnion(const Container_t<MetadataFlag, extra...> &flags) {
Expand Down
2 changes: 2 additions & 0 deletions src/interface/sparse_pack_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,8 @@ struct PackDescriptor {
var_group_names.push_back(std::to_string(vg));
return var_group_names;
}
// silence compiler warnings about no return statement
return std::vector<std::string>();
}
};
} // namespace impl
Expand Down
2 changes: 1 addition & 1 deletion src/mesh/mesh.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ class Mesh {

// expose a mesh-level call to get lists of variables from resolved_packages
template <typename... Args>
std::vector<std::string> GetVariablesNames(Args &&...args) {
std::vector<std::string> GetVariableNames(Args &&...args) {
return resolved_packages->GetVariableNames(std::forward<Args>(args)...);
}

Expand Down

0 comments on commit fb6110c

Please sign in to comment.