diff --git a/src/Utils.hpp b/src/Utils.hpp index ded4bf5b..6991278e 100644 --- a/src/Utils.hpp +++ b/src/Utils.hpp @@ -91,7 +91,8 @@ inline void convertFloatToInt16LE(const float* source, auto intData = static_cast(dest); for (SizeType i = 0; i < numSamples; ++i) { - auto clampedValue = std::clamp(maxVal * static_cast(source[i]), -maxVal, maxVal); + auto clampedValue = + std::clamp(maxVal * static_cast(source[i]), -maxVal, maxVal); auto intValue = static_cast(static_cast(std::round(clampedValue))); intValue = boost::endian::native_to_little(intValue); diff --git a/tests/examples/testWorkflowExamples.cpp b/tests/examples/testWorkflowExamples.cpp index ee5f5eb8..7a845842 100644 --- a/tests/examples/testWorkflowExamples.cpp +++ b/tests/examples/testWorkflowExamples.cpp @@ -70,12 +70,18 @@ TEST_CASE("workflowExamples") const auto& channelVector = mockRecordingArrays[i]; for (const auto& channel : channelVector) { // copy data into buffer - std::copy(mockData[channel.globalIndex].begin() + static_cast(samplesRecorded), - mockData[channel.globalIndex].begin() + static_cast(samplesRecorded + bufferSize), - dataBuffer.begin()); - std::copy(mockTimestamps.begin() + static_cast(samplesRecorded), - mockTimestamps.begin() + static_cast(samplesRecorded + bufferSize), - timestampsBuffer.begin()); + std::copy( + mockData[channel.globalIndex].begin() + + static_cast(samplesRecorded), + mockData[channel.globalIndex].begin() + + static_cast(samplesRecorded + bufferSize), + dataBuffer.begin()); + std::copy( + mockTimestamps.begin() + + static_cast(samplesRecorded), + mockTimestamps.begin() + + static_cast(samplesRecorded + bufferSize), + timestampsBuffer.begin()); // write timeseries data std::vector positionOffset = {samplesRecorded, diff --git a/tests/testNWBFile.cpp b/tests/testNWBFile.cpp index 3a59132d..df77c4cb 100644 --- a/tests/testNWBFile.cpp +++ b/tests/testNWBFile.cpp @@ -97,7 +97,7 @@ TEST_CASE("createMultipleEcephysDatasets", "[nwb]") mockSpikeChannelNames, BaseDataType::F32, recordingContainers.get()); - REQUIRE(resultCreateSES == Status::Success); + REQUIRE(resultCreateSES == Status::Success); // start recording Status resultStart = io->startRecording();