Skip to content

Commit 620504d

Browse files
author
Zaina Shaikh
committed
Fix Clang-Tidy
1 parent 7cbb86f commit 620504d

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

Simulator/Recorders/Hdf5Recorder.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,10 @@ class Hdf5Recorder : public Recorder {
138138
} else if (hdf5Datatype_ == PredType::NATIVE_INT) {
139139
vector<int> dataBuffer(variableLocation_.getNumElements());
140140
for (int i = 0; i < variableLocation_.getNumElements(); ++i) {
141-
if constexpr (std::is_same_v<vertexType, std::decay_t<decltype(get<vertexType>
142-
(variableLocation_.getElement(i)))>>) {
143-
dataBuffer[i] = static_cast<int>(get<vertexType>(variableLocation_.getElement(i)));
141+
if constexpr (std::is_same_v<vertexType, std::decay_t<decltype(get<vertexType>(
142+
variableLocation_.getElement(i)))>>) {
143+
dataBuffer[i]
144+
= static_cast<int>(get<vertexType>(variableLocation_.getElement(i)));
144145
} else {
145146
dataBuffer[i] = get<int>(variableLocation_.getElement(i));
146147
}

Simulator/Recorders/RecordableBase.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414
#pragma once
1515

1616
using namespace std;
17+
#include "VertexType.h"
1718
#include <string>
1819
#include <typeinfo>
19-
#include "VertexType.h"
2020
#include <variant>
2121
#include <vector>
2222
// cereal

Simulator/Utils/VertexType.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ inline std::ostream &operator<<(std::ostream &os, vertexType vT)
4242
return os;
4343
}
4444

45-
#endif // VERTEX_TYPE_H
45+
#endif // VERTEX_TYPE_H

Testing/UnitTesting/Hdf5RecorderTests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ TEST(Hdf5RecorderTest, SaveSimDataVertexTypeTest)
207207
// Verify the data matches the expected NeuronType values (converted to int)
208208
vector<int> expectedData = {static_cast<int>(vertexType::EXC), static_cast<int>(vertexType::INH),
209209
static_cast<int>(vertexType::EXC)};
210-
210+
211211
ASSERT_EQ(expectedData.size(), dataBuffer.size());
212212
for (size_t i = 0; i < expectedData.size(); ++i) {
213213
EXPECT_EQ(expectedData[i], dataBuffer[i]);

0 commit comments

Comments
 (0)