Skip to content

Commit fbe02d0

Browse files
committed
fix(nodes/fpga): Fix cppcheck warning
Signed-off-by: Philipp Jungkamp <philipp.jungkamp@rwth-aachen.de>
1 parent 7079cf4 commit fbe02d0

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

lib/nodes/fpga.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,10 +221,10 @@ int FpgaNode::start() {
221221
// If fastWrite receives less signals than expected, the previous data
222222
// will be reused for the remaining signals
223223
int FpgaNode::fastWrite(Sample *smps[], unsigned cnt) {
224-
Sample *smp = smps[0];
225-
226224
assert(cnt == 1 && smps != nullptr && smps[0] != nullptr);
227225

226+
Sample *smp = smps[0];
227+
228228
for (unsigned i = 0; i < smp->length; i++) {
229229
if (smp->signals->getByIndex(i)->type == SignalType::FLOAT) {
230230
(*accessorTxFloat)[i] = static_cast<float>(smp->data[i].f);
@@ -340,11 +340,10 @@ int FpgaNode::_write(Sample *smps[], unsigned cnt) {
340340
}
341341

342342
int FpgaNode::slowWrite(Sample *smps[], unsigned cnt) {
343-
// unsigned int written;
344-
Sample *smp = smps[0];
345-
346343
assert(cnt == 1 && smps != nullptr && smps[0] != nullptr);
347344

345+
Sample *smp = smps[0];
346+
348347
auto mem = MemoryAccessor<float>(*blockTx);
349348

350349
for (unsigned i = 0; i < smps[0]->length; i++) {

0 commit comments

Comments
 (0)