From 28230032f7c37ff9dc516a368ac02da7872d73a6 Mon Sep 17 00:00:00 2001 From: Steph Prince <40640337+stephprince@users.noreply.github.com> Date: Tue, 17 Sep 2024 15:02:54 -0700 Subject: [PATCH] fix formatting --- src/Utils.hpp | 3 ++- tests/examples/testWorkflowExamples.cpp | 18 ++++++++++++------ tests/testNWBFile.cpp | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) 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();