From d4dd0e95fd2ef774d67c17a5b64c7358fd0262a8 Mon Sep 17 00:00:00 2001 From: DashyFox Date: Thu, 29 Aug 2024 16:22:09 +0300 Subject: [PATCH] upd --- IR_DecoderRaw.cpp | 176 ---------------------------------------------- 1 file changed, 176 deletions(-) diff --git a/IR_DecoderRaw.cpp b/IR_DecoderRaw.cpp index c0ee268..997b54a 100644 --- a/IR_DecoderRaw.cpp +++ b/IR_DecoderRaw.cpp @@ -650,179 +650,3 @@ inline void IR_DecoderRaw::infoPulse(uint8_t pin, uint8_t count) } } #endif - -// Конструктор копирования - IR_DecoderRaw::IR_DecoderRaw(const IR_DecoderRaw& other) - : packInfo(other.packInfo), - encoder(other.encoder), // Если IR_Encoder имеет безопасный копируемый указатель - isAvailable(other.isAvailable), - packSize(other.packSize), - crcValue(other.crcValue), - isPairSending(other.isPairSending), - isRecive(other.isRecive), - isPreamb(other.isPreamb), - isSubBufferOverflow(other.isSubBufferOverflow), - isBufferOverflow(other.isBufferOverflow), - isWrongPack(other.isWrongPack), - riseSyncTime(other.riseSyncTime), - currentSubBufferIndex(other.currentSubBufferIndex), - subBuffer(other.subBuffer), // Копирование буфера - lastFront(other.lastFront), - firstUnHandledFront(other.firstUnHandledFront), - prevRise(other.prevRise), - prevPrevRise(other.prevPrevRise), - prevFall(other.prevFall), - prevPrevFall(other.prevPrevFall), - risePeriod(other.risePeriod), - highTime(other.highTime), - lowTime(other.lowTime), - oldTime(other.oldTime), - wrongCounter(other.wrongCounter), - highCount(other.highCount), - lowCount(other.lowCount), - allCount(other.allCount), - errorCounter(other.errorCounter), - preambFrontCounter(other.preambFrontCounter), - bufBitPos(other.bufBitPos), - isData(other.isData), - i_dataBuffer(other.i_dataBuffer), - nextControlBit(other.nextControlBit), - i_syncBit(other.i_syncBit), - err_syncBit(other.err_syncBit) - { - // Специфическое копирование, если нужно - } - - // Оператор копирующего присваивания - IR_DecoderRaw& IR_DecoderRaw::operator=(const IR_DecoderRaw& other) { - if (this != &other) { // Проверка на самоприсваивание - packInfo = other.packInfo; - encoder = other.encoder; - isAvailable = other.isAvailable; - packSize = other.packSize; - crcValue = other.crcValue; - isPairSending = other.isPairSending; - isRecive = other.isRecive; - isPreamb = other.isPreamb; - isSubBufferOverflow = other.isSubBufferOverflow; - isBufferOverflow = other.isBufferOverflow; - isWrongPack = other.isWrongPack; - riseSyncTime = other.riseSyncTime; - currentSubBufferIndex = other.currentSubBufferIndex; - subBuffer = other.subBuffer; - lastFront = other.lastFront; - firstUnHandledFront = other.firstUnHandledFront; - prevRise = other.prevRise; - prevPrevRise = other.prevPrevRise; - prevFall = other.prevFall; - prevPrevFall = other.prevPrevFall; - risePeriod = other.risePeriod; - highTime = other.highTime; - lowTime = other.lowTime; - oldTime = other.oldTime; - wrongCounter = other.wrongCounter; - highCount = other.highCount; - lowCount = other.lowCount; - allCount = other.allCount; - errorCounter = other.errorCounter; - preambFrontCounter = other.preambFrontCounter; - bufBitPos = other.bufBitPos; - isData = other.isData; - i_dataBuffer = other.i_dataBuffer; - nextControlBit = other.nextControlBit; - i_syncBit = other.i_syncBit; - err_syncBit = other.err_syncBit; - } - return *this; - } - - // Конструктор перемещения - IR_DecoderRaw::IR_DecoderRaw(IR_DecoderRaw&& other) - : packInfo(std::move(other.packInfo)), - encoder(other.encoder), - isAvailable(other.isAvailable), - packSize(other.packSize), - crcValue(other.crcValue), - isPairSending(other.isPairSending), - isRecive(other.isRecive), - isPreamb(other.isPreamb), - isSubBufferOverflow(other.isSubBufferOverflow), - isBufferOverflow(other.isBufferOverflow), - isWrongPack(other.isWrongPack), - riseSyncTime(other.riseSyncTime), - currentSubBufferIndex(other.currentSubBufferIndex), - subBuffer(std::move(other.subBuffer)), - lastFront(other.lastFront), - firstUnHandledFront(other.firstUnHandledFront), - prevRise(other.prevRise), - prevPrevRise(other.prevPrevRise), - prevFall(other.prevFall), - prevPrevFall(other.prevPrevFall), - risePeriod(other.risePeriod), - highTime(other.highTime), - lowTime(other.lowTime), - oldTime(other.oldTime), - wrongCounter(other.wrongCounter), - highCount(other.highCount), - lowCount(other.lowCount), - allCount(other.allCount), - errorCounter(other.errorCounter), - preambFrontCounter(other.preambFrontCounter), - bufBitPos(other.bufBitPos), - isData(other.isData), - i_dataBuffer(other.i_dataBuffer), - nextControlBit(other.nextControlBit), - i_syncBit(other.i_syncBit), - err_syncBit(other.err_syncBit) - { - other.encoder = nullptr; - other.lastFront = nullptr; - other.firstUnHandledFront = nullptr; - } - - // Оператор перемещающего присваивания - IR_DecoderRaw& IR_DecoderRaw::operator=(IR_DecoderRaw&& other) { - if (this != &other) { // Проверка на самоприсваивание - packInfo = std::move(other.packInfo); - encoder = other.encoder; - isAvailable = other.isAvailable; - packSize = other.packSize; - crcValue = other.crcValue; - isPairSending = other.isPairSending; - isRecive = other.isRecive; - isPreamb = other.isPreamb; - isSubBufferOverflow = other.isSubBufferOverflow; - isBufferOverflow = other.isBufferOverflow; - isWrongPack = other.isWrongPack; - riseSyncTime = other.riseSyncTime; - currentSubBufferIndex = other.currentSubBufferIndex; - subBuffer = std::move(other.subBuffer); - lastFront = other.lastFront; - firstUnHandledFront = other.firstUnHandledFront; - prevRise = other.prevRise; - prevPrevRise = other.prevPrevRise; - prevFall = other.prevFall; - prevPrevFall = other.prevPrevFall; - risePeriod = other.risePeriod; - highTime = other.highTime; - lowTime = other.lowTime; - oldTime = other.oldTime; - wrongCounter = other.wrongCounter; - highCount = other.highCount; - lowCount = other.lowCount; - allCount = other.allCount; - errorCounter = other.errorCounter; - preambFrontCounter = other.preambFrontCounter; - bufBitPos = other.bufBitPos; - isData = other.isData; - i_dataBuffer = other.i_dataBuffer; - nextControlBit = other.nextControlBit; - i_syncBit = other.i_syncBit; - err_syncBit = other.err_syncBit; - - other.encoder = nullptr; - other.lastFront = nullptr; - other.firstUnHandledFront = nullptr; - } - return *this; - }