Skip to content

Commit

Permalink
[SolutionArray] Do no return group name
Browse files Browse the repository at this point in the history
  • Loading branch information
ischoegl committed Mar 21, 2023
1 parent fe807d5 commit 5841dcd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions include/cantera/base/SolutionArray.h
Expand Up @@ -231,8 +231,8 @@ class SolutionArray
* @param overwrite Force overwrite if sub exists; optional (default=false)
* @param compression Compression level; optional (default=0; HDF only)
*/
string save(const string& fname, const string& id, const string& sub,
const string& desc, bool overwrite=false, int compression=0);
void save(const string& fname, const string& id, const string& sub,
const string& desc, bool overwrite=false, int compression=0);

/*!
* Read header data from container file.
Expand Down
6 changes: 3 additions & 3 deletions src/base/SolutionArray.cpp
Expand Up @@ -781,7 +781,7 @@ void SolutionArray::append(const vector<double>& state, const AnyMap& extra)
}
}

string SolutionArray::save(const string& fname, const string& id, const string& sub,
void SolutionArray::save(const string& fname, const string& id, const string& sub,
const string& desc, bool overwrite, int compression)
{
if (m_size < m_dataSize) {
Expand All @@ -793,7 +793,7 @@ string SolutionArray::save(const string& fname, const string& id, const string&
if (extension == "h5" || extension == "hdf" || extension == "hdf5") {
writeHeader(fname, id, desc, overwrite);
writeEntry(fname, id, sub, true, compression);
return id;
return;
}
if (extension == "yaml" || extension == "yml") {
// Check for an existing file and load it if present
Expand All @@ -808,7 +808,7 @@ string SolutionArray::save(const string& fname, const string& id, const string&
std::ofstream out(fname);
out << data.toYamlString();
AnyMap::clearCachedFile(fname);
return id;
return;
}
throw CanteraError("SolutionArray::save",
"Unknown file extension '{}'.", extension);
Expand Down

0 comments on commit 5841dcd

Please sign in to comment.