From 691f29540b7785724cff7ea192973884ad0cd30c Mon Sep 17 00:00:00 2001 From: Andreas Griesshammer Date: Thu, 9 May 2024 08:12:08 -0600 Subject: [PATCH 1/2] Bug fix for array comparison error: comparison between two arrays is deprecated in C++20 [-Werror=array-compare] --- src/libraries/fiff/fiff_id.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libraries/fiff/fiff_id.h b/src/libraries/fiff/fiff_id.h index cbd83073703..7cf5c039408 100644 --- a/src/libraries/fiff/fiff_id.h +++ b/src/libraries/fiff/fiff_id.h @@ -189,7 +189,8 @@ inline qint32 FiffId::storageSize() inline bool operator== (const FiffId &a, const FiffId &b) { return (a.version == b.version && - a.machid == b.machid && + a.machid[0] == b.machid[0] && + a.machid[1] == b.machid[1] && a.time.secs == b.time.secs && a.time.usecs == b.time.usecs); } From 6f92c0bd13d75e1017f19444866a5243d0923159 Mon Sep 17 00:00:00 2001 From: Andreas Griesshammer Date: Wed, 26 Nov 2025 13:51:08 +0100 Subject: [PATCH 2/2] FIX warning: 'T* QScopedPointer::take() [with T = MNELIB::MNEEpochData; Cleanup = QScopedPointerDeleter]' is deprecated: Use std::unique_ptr instead, and call release(). [-Wdeprecated-declarations] --- src/libraries/rtprocessing/averaging.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libraries/rtprocessing/averaging.cpp b/src/libraries/rtprocessing/averaging.cpp index 3513fd534c1..8e54a6a4f1f 100644 --- a/src/libraries/rtprocessing/averaging.cpp +++ b/src/libraries/rtprocessing/averaging.cpp @@ -147,7 +147,7 @@ FiffEvoked RTPROCESSINGLIB::computeFilteredAverage(const FiffRawData& raw, MatrixXd timesDummy; MatrixXd times; - QScopedPointer epoch(Q_NULLPTR); + std::unique_ptr epoch(Q_NULLPTR); int iFilterDelay = filterKernel.getFilterOrder()/2; for (p = 0; p < count; ++p) { @@ -184,10 +184,10 @@ FiffEvoked RTPROCESSINGLIB::computeFilteredAverage(const FiffRawData& raw, //Check if data block has the same size as the previous one if(!lstEpochDataList.isEmpty()) { if(epoch->epoch.size() == lstEpochDataList.last()->epoch.size()) { - lstEpochDataList.append(MNEEpochData::SPtr(epoch.take()));//List takes ownwership of the pointer - no delete need + lstEpochDataList.append(MNEEpochData::SPtr(epoch.release()));//List takes ownwership of the pointer - no delete need } } else { - lstEpochDataList.append(MNEEpochData::SPtr(epoch.take()));//List takes ownwership of the pointer - no delete need + lstEpochDataList.append(MNEEpochData::SPtr(epoch.release()));//List takes ownwership of the pointer - no delete need } } else { qWarning("[MNEEpochDataList::readEpochs] Can't read the event data segments.");