Skip to content

Commit

Permalink
Add default Compression::Auto to Block constructor
Browse files Browse the repository at this point in the history
The Block constructor used for existing blocks, i.e., when a Block is
created through getBlock(), did not have a default 'compr' value, which
would cause issues with uninitialised values.

It's now initialised to Compression::Auto.
  • Loading branch information
achilleas-k committed Jul 6, 2018
1 parent 7da6655 commit 8135f5f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion backend/fs/BlockFS.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace nix {
namespace file {

BlockFS::BlockFS(const std::shared_ptr<base::IFile> &file, const std::string &loc)
: EntityWithMetadataFS(file, loc)
: EntityWithMetadataFS(file, loc), compr(Compression::Auto)
{
createSubFolders(file);
}
Expand Down
2 changes: 1 addition & 1 deletion backend/hdf5/BlockHDF5.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace hdf5 {


BlockHDF5::BlockHDF5(const std::shared_ptr<base::IFile> &file, const H5Group &group)
: EntityWithMetadataHDF5(file, group) {
: EntityWithMetadataHDF5(file, group), compr(Compression::Auto) {
data_array_group = this->group().openOptGroup("data_arrays");
data_frame_group = this->group().openOptGroup("data_frames");
tag_group = this->group().openOptGroup("tags");
Expand Down

0 comments on commit 8135f5f

Please sign in to comment.