Skip to content

Commit

Permalink
Restore ostream state as discovered by coverity
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Dec 19, 2023
1 parent c99927c commit d4575ae
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/GenericParameters.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,15 @@ std::ostream& operator<<(std::ostream& os, const std::vector<T>& values) {

template <typename MapType>
void printMap(const MapType& map, std::ostream& os) {
const auto osflags = os.flags();
os << std::left << std::setw(30) << "Key "
<< "Value " << '\n';
os << "--------------------------------------------------------------------------------\n";
for (const auto& [key, value] : map) {
os << std::left << std::setw(30) << key << value << '\n';
}

os.flags(osflags);
}

void GenericParameters::print(std::ostream& os, bool flush) {
Expand Down

0 comments on commit d4575ae

Please sign in to comment.