Skip to content

Commit

Permalink
fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
stephprince committed Aug 6, 2024
1 parent 75c31a9 commit e41258f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/BaseIO.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ class BaseIO
* @return True if the file is in a modification mode, false otherwise.
*/
virtual bool canModifyObjects() = 0;

/**
* @brief Creates an extendable dataset with a given base data type, size,
* chunking, and path.
Expand Down
7 changes: 4 additions & 3 deletions src/hdf5/HDF5IO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -402,14 +402,15 @@ bool HDF5IO::canModifyObjects()
unsigned int intent;
herr_t status = H5Fget_intent(this->file->getId(), &intent);
if (status < 0) {
return false; // We could not access the file so modifying objects is not going to work
return false; // We could not access the file so modifying objects is not
// going to work
}

// Check if SWMR mode is enabled
if (intent & (H5F_ACC_SWMR_READ | H5F_ACC_SWMR_WRITE)) {
return false; // File is in SWMR mode
return false; // File is in SWMR mode
} else {
return true; // File is not in SWMR mode
return true; // File is not in SWMR mode
}
return true;
}
Expand Down
3 changes: 1 addition & 2 deletions tests/testNWBFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,11 @@ TEST_CASE("setCanModifyObjectsMode", "[nwb]")
nwbfile.finalize();
}


TEST_CASE("pauseRecording", "[nwb]")
{
std::string filename = getTestFilePath("testPauseRecording.nwb");

// initialize nwbfile object and create base structure
// initialize nwbfile object and create base structure
NWB::NWBFile nwbfile(generateUuid(),
std::make_unique<HDF5::HDF5IO>(filename));
nwbfile.initialize();
Expand Down

0 comments on commit e41258f

Please sign in to comment.