fix previous commit

This commit is contained in:
John
2023-06-04 08:11:51 +02:00
parent 1222eb165e
commit 746b79d17e
2 changed files with 14 additions and 16 deletions
+2 -2
View File
@@ -1179,8 +1179,8 @@ bool BusHandler::addSeenAddress(symbol_t address) {
void BusHandler::messageCompleted() {
const char* prefix = m_currentRequest ? "sent" : "received";
// do an explicit copy here in case being called by another thread
const MasterSymbolString command = m_currentRequest ? m_currentRequest->m_master : m_command;
SlaveSymbolString response = m_response;
const MasterSymbolString command(m_currentRequest ? m_currentRequest->m_master : m_command);
const SlaveSymbolString response(m_response);
symbol_t srcAddress = command[0], dstAddress = command[1];
if (srcAddress == dstAddress) {
logError(lf_bus, "invalid self-addressed message from %2.2x", srcAddress);
+12 -14
View File
@@ -370,6 +370,12 @@ class MasterSymbolString : public SymbolString {
*/
MasterSymbolString() : SymbolString(true) {}
/**
* Copy constructor.
* @param str the @a MasterSymbolString to copy from.
*/
MasterSymbolString(const MasterSymbolString& str) : SymbolString(str) {}
MasterSymbolString& operator=(const MasterSymbolString& other) {
this->m_data = other.m_data;
this->m_isMaster = true;
@@ -381,13 +387,6 @@ class MasterSymbolString : public SymbolString {
this->m_isMaster = true;
return *this;
}
private:
/**
* Copy constructor.
* @param str the @a MasterSymbolString to copy from.
*/
MasterSymbolString(const MasterSymbolString& str) : SymbolString(str) {}
};
@@ -401,6 +400,12 @@ class SlaveSymbolString : public SymbolString {
*/
SlaveSymbolString() : SymbolString(false) {}
/**
* Copy constructor.
* @param str the @a SlaveSymbolString to copy from.
*/
SlaveSymbolString(const SlaveSymbolString& str) : SymbolString(str) {}
SlaveSymbolString& operator=(const SlaveSymbolString& other) {
this->m_data = other.m_data;
this->m_isMaster = false;
@@ -412,13 +417,6 @@ class SlaveSymbolString : public SymbolString {
this->m_isMaster = false;
return *this;
}
private:
/**
* Copy constructor.
* @param str the @a SlaveSymbolString to copy from.
*/
SlaveSymbolString(const SlaveSymbolString& str) : SymbolString(str) {}
};