Skip to content

Commit e9ade75

Browse files
author
Zaina Shaikh
committed
Clang-tidy issues
1 parent 15d5593 commit e9ade75

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

Simulator/Recorders/Hdf5Recorder.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,19 +191,18 @@ void Hdf5Recorder::compileHistories()
191191
for (size_t i = 0; i < variableInfo.variableLocation_.getNumElements(); ++i) {
192192
// For type int, a distinction needs to be made between vertexType and regular integers
193193
// Since vertexType is an enum class, it needs to first be converted to an integer before storing
194-
195-
// 'decltype' determines the type at compile time
194+
195+
// 'decltype' determines the type at compile time
196196
// 'decay_t' removes any references/const from the type
197197
// This simplifies comparisons through 'is_same_v' to ensure type matches vertexType
198-
if (std::is_same_v<
199-
vertexType,
200-
std::decay_t<decltype(get<vertexType>(
201-
variableInfo.variableLocation_.getElement(i)))>>) {
198+
if (std::is_same_v<vertexType,
199+
std::decay_t<decltype(get<vertexType>(
200+
variableInfo.variableLocation_.getElement(i)))>>) {
202201
// If type matches vertexType, convert to int before storing
203202
dataBuffer[i] = static_cast<int>(
204203
get<vertexType>(variableInfo.variableLocation_.getElement(i)));
205204
} else {
206-
// Otherwise, store as a regular integer
205+
// Otherwise, store as a regular integer
207206
dataBuffer[i] = get<int>(variableInfo.variableLocation_.getElement(i));
208207
}
209208
}

Simulator/Recorders/Hdf5Recorder.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,17 +140,17 @@ class Hdf5Recorder : public Recorder {
140140
for (int i = 0; i < variableLocation_.getNumElements(); ++i) {
141141
// For type int, a distinction needs to be made between vertexType and regular integers
142142
// Since vertexType is an enum class, it needs to first be converted to an integer before storing
143-
144-
// 'decltype' determines the type at compile time
143+
144+
// 'decltype' determines the type at compile time
145145
// 'decay_t' removes any references/const from the type
146146
// This simplifies comparisons through 'is_same_v' to ensure type matches vertexType
147147
if (std::is_same_v<vertexType, std::decay_t<decltype(get<vertexType>(
148-
variableLocation_.getElement(i)))>>) {
148+
variableLocation_.getElement(i)))>>) {
149149
// If type matches vertexType, convert to int before storing
150150
dataBuffer[i]
151151
= static_cast<int>(get<vertexType>(variableLocation_.getElement(i)));
152152
} else {
153-
// Otherwise, store as a regular integer
153+
// Otherwise, store as a regular integer
154154
dataBuffer[i] = get<int>(variableLocation_.getElement(i));
155155
}
156156
}

0 commit comments

Comments
 (0)