diff --git a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp index 4e3b0720..d07ec0dd 100644 --- a/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp +++ b/src/DebugToolDrivers/Protocols/CMSIS-DAP/VendorSpecific/EDBG/AVR/EdbgAvr8Interface.cpp @@ -1118,12 +1118,12 @@ void EdbgAvr8Interface::activatePhysical(bool applyExternalReset) { if (response.getResponseId() == Avr8ResponseId::FAILED) { if (!applyExternalReset) { // Try again with external reset applied - Logger::debug("Failed to activate physical interface on AVR8 target - retrying with external reset applied."); + Logger::debug("Failed to activate physical interface on AVR8 target " + "- retrying with external reset applied."); return this->activatePhysical(true); - - } else { - throw Avr8CommandFailure("AVR8 Activate physical interface command failed", response); } + + throw Avr8CommandFailure("AVR8 Activate physical interface command failed", response); } this->physicalInterfaceActivated = true; diff --git a/src/EventManager/Events/BreakpointRemovedOnTarget.hpp b/src/EventManager/Events/BreakpointRemovedOnTarget.hpp index 7d942094..52908d9d 100644 --- a/src/EventManager/Events/BreakpointRemovedOnTarget.hpp +++ b/src/EventManager/Events/BreakpointRemovedOnTarget.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class BreakpointRemovedOnTarget: public Event { public: - static inline EventType type = EventType::BREAKPOINT_REMOVED_ON_TARGET; + static constexpr EventType type = EventType::BREAKPOINT_REMOVED_ON_TARGET; static inline const std::string name = "BreakpointRemovedOnTarget"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/BreakpointSetOnTarget.hpp b/src/EventManager/Events/BreakpointSetOnTarget.hpp index f05e3e8c..4f7f7dec 100644 --- a/src/EventManager/Events/BreakpointSetOnTarget.hpp +++ b/src/EventManager/Events/BreakpointSetOnTarget.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class BreakpointSetOnTarget: public Event { public: - static inline EventType type = EventType::BREAKPOINT_SET_ON_TARGET; + static constexpr EventType type = EventType::BREAKPOINT_SET_ON_TARGET; static inline const std::string name = "BreakpointSetOnTarget"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/DebugServerThreadStateChanged.hpp b/src/EventManager/Events/DebugServerThreadStateChanged.hpp index 29d09796..31d91f97 100644 --- a/src/EventManager/Events/DebugServerThreadStateChanged.hpp +++ b/src/EventManager/Events/DebugServerThreadStateChanged.hpp @@ -10,7 +10,7 @@ namespace Bloom::Events class DebugServerThreadStateChanged: public Event { public: - static inline EventType type = EventType::DEBUG_SERVER_THREAD_STATE_CHANGED; + static constexpr EventType type = EventType::DEBUG_SERVER_THREAD_STATE_CHANGED; static inline const std::string name = "DebugServerThreadStateChanged"; explicit DebugServerThreadStateChanged(ThreadState state): state(state) {}; diff --git a/src/EventManager/Events/DebugSessionFinished.hpp b/src/EventManager/Events/DebugSessionFinished.hpp index a0b497f8..f73dddb5 100644 --- a/src/EventManager/Events/DebugSessionFinished.hpp +++ b/src/EventManager/Events/DebugSessionFinished.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class DebugSessionFinished: public Event { public: - static inline EventType type = EventType::DEBUG_SESSION_FINISHED; + static constexpr EventType type = EventType::DEBUG_SESSION_FINISHED; static inline const std::string name = "DebugSessionFinished"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/DebugSessionStarted.hpp b/src/EventManager/Events/DebugSessionStarted.hpp index a237ad15..72f83822 100644 --- a/src/EventManager/Events/DebugSessionStarted.hpp +++ b/src/EventManager/Events/DebugSessionStarted.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class DebugSessionStarted: public Event { public: - static inline EventType type = EventType::DEBUG_SESSION_STARTED; + static constexpr EventType type = EventType::DEBUG_SESSION_STARTED; static inline const std::string name = "DebugSessionStarted"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/Event.hpp b/src/EventManager/Events/Event.hpp index 30cd392f..0be246d5 100644 --- a/src/EventManager/Events/Event.hpp +++ b/src/EventManager/Events/Event.hpp @@ -62,7 +62,7 @@ namespace Bloom::Events QDateTime createdTimestamp = DateTime::currentDateTime(); std::optional correlationId; - static inline EventType type = EventType::GENERIC; + static constexpr EventType type = EventType::GENERIC; static inline const std::string name = "GenericEvent"; [[nodiscard]] virtual std::string getName() const { diff --git a/src/EventManager/Events/ExtractTargetDescriptor.hpp b/src/EventManager/Events/ExtractTargetDescriptor.hpp index 1681a92e..9555b60d 100644 --- a/src/EventManager/Events/ExtractTargetDescriptor.hpp +++ b/src/EventManager/Events/ExtractTargetDescriptor.hpp @@ -13,7 +13,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = TargetDescriptorExtracted; - static inline EventType type = EventType::EXTRACT_TARGET_DESCRIPTOR; + static constexpr EventType type = EventType::EXTRACT_TARGET_DESCRIPTOR; static inline const std::string name = "ExtractTargetDescriptor"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/InsightThreadStateChanged.hpp b/src/EventManager/Events/InsightThreadStateChanged.hpp index 771e81b3..0f4fd047 100644 --- a/src/EventManager/Events/InsightThreadStateChanged.hpp +++ b/src/EventManager/Events/InsightThreadStateChanged.hpp @@ -12,7 +12,7 @@ namespace Bloom::Events public: explicit InsightThreadStateChanged(ThreadState state): state(state) {}; - static inline EventType type = EventType::INSIGHT_THREAD_STATE_CHANGED; + static constexpr EventType type = EventType::INSIGHT_THREAD_STATE_CHANGED; static inline const std::string name = "InsightThreadStateChanged"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/MemoryRetrievedFromTarget.hpp b/src/EventManager/Events/MemoryRetrievedFromTarget.hpp index 24e75758..4be53eca 100644 --- a/src/EventManager/Events/MemoryRetrievedFromTarget.hpp +++ b/src/EventManager/Events/MemoryRetrievedFromTarget.hpp @@ -10,7 +10,7 @@ namespace Bloom::Events class MemoryRetrievedFromTarget: public Event { public: - static inline EventType type = EventType::MEMORY_RETRIEVED_FROM_TARGET; + static constexpr EventType type = EventType::MEMORY_RETRIEVED_FROM_TARGET; static inline const std::string name = "MemoryRetrievedFromTarget"; Targets::TargetMemoryBuffer data; diff --git a/src/EventManager/Events/MemoryWrittenToTarget.hpp b/src/EventManager/Events/MemoryWrittenToTarget.hpp index 76652537..c6ee83bc 100644 --- a/src/EventManager/Events/MemoryWrittenToTarget.hpp +++ b/src/EventManager/Events/MemoryWrittenToTarget.hpp @@ -10,7 +10,7 @@ namespace Bloom::Events class MemoryWrittenToTarget: public Event { public: - static inline EventType type = EventType::MEMORY_WRITTEN_TO_TARGET; + static constexpr EventType type = EventType::MEMORY_WRITTEN_TO_TARGET; static inline const std::string name = "MemoryWrittenToTarget"; MemoryWrittenToTarget() = default; diff --git a/src/EventManager/Events/ProgramCounterSetOnTarget.hpp b/src/EventManager/Events/ProgramCounterSetOnTarget.hpp index 4602c1eb..354eba72 100644 --- a/src/EventManager/Events/ProgramCounterSetOnTarget.hpp +++ b/src/EventManager/Events/ProgramCounterSetOnTarget.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class ProgramCounterSetOnTarget: public Event { public: - static inline EventType type = EventType::PROGRAM_COUNTER_SET_ON_TARGET; + static constexpr EventType type = EventType::PROGRAM_COUNTER_SET_ON_TARGET; static inline const std::string name = "ProgramCounterSetOnTarget"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/RegistersRetrievedFromTarget.hpp b/src/EventManager/Events/RegistersRetrievedFromTarget.hpp index a0e35e48..31dc92f2 100644 --- a/src/EventManager/Events/RegistersRetrievedFromTarget.hpp +++ b/src/EventManager/Events/RegistersRetrievedFromTarget.hpp @@ -10,7 +10,7 @@ namespace Bloom::Events class RegistersRetrievedFromTarget: public Event { public: - static inline EventType type = EventType::REGISTERS_RETRIEVED_FROM_TARGET; + static constexpr EventType type = EventType::REGISTERS_RETRIEVED_FROM_TARGET; static inline const std::string name = "RegistersRetrievedFromTarget"; Targets::TargetRegisters registers; diff --git a/src/EventManager/Events/RegistersWrittenToTarget.hpp b/src/EventManager/Events/RegistersWrittenToTarget.hpp index d8f071db..4060e853 100644 --- a/src/EventManager/Events/RegistersWrittenToTarget.hpp +++ b/src/EventManager/Events/RegistersWrittenToTarget.hpp @@ -10,7 +10,7 @@ namespace Bloom::Events class RegistersWrittenToTarget: public Event { public: - static inline EventType type = EventType::REGISTERS_WRITTEN_TO_TARGET; + static constexpr EventType type = EventType::REGISTERS_WRITTEN_TO_TARGET; static inline const std::string name = "RegistersWrittenToTarget"; Targets::TargetRegisters registers; diff --git a/src/EventManager/Events/RemoveBreakpointOnTarget.hpp b/src/EventManager/Events/RemoveBreakpointOnTarget.hpp index e82f1b57..949f1194 100644 --- a/src/EventManager/Events/RemoveBreakpointOnTarget.hpp +++ b/src/EventManager/Events/RemoveBreakpointOnTarget.hpp @@ -14,7 +14,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = BreakpointRemovedOnTarget; - static inline EventType type = EventType::REMOVE_BREAKPOINT_ON_TARGET; + static constexpr EventType type = EventType::REMOVE_BREAKPOINT_ON_TARGET; static inline const std::string name = "RemoveBreakpointOnTarget"; Targets::TargetBreakpoint breakpoint; diff --git a/src/EventManager/Events/ReportTargetControllerState.hpp b/src/EventManager/Events/ReportTargetControllerState.hpp index 5e48b664..3818a778 100644 --- a/src/EventManager/Events/ReportTargetControllerState.hpp +++ b/src/EventManager/Events/ReportTargetControllerState.hpp @@ -12,7 +12,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = TargetControllerStateReported; - static inline EventType type = EventType::REPORT_TARGET_CONTROLLER_STATE; + static constexpr EventType type = EventType::REPORT_TARGET_CONTROLLER_STATE; static inline const std::string name = "ReportTargetControllerState"; ReportTargetControllerState() {}; diff --git a/src/EventManager/Events/ResetTarget.hpp b/src/EventManager/Events/ResetTarget.hpp index 9ac0753e..38f9b197 100644 --- a/src/EventManager/Events/ResetTarget.hpp +++ b/src/EventManager/Events/ResetTarget.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class ResetTarget: public Event { public: - static inline EventType type = EventType::RESET_TARGET; + static constexpr EventType type = EventType::RESET_TARGET; static inline const std::string name = "ResetTargetEvent"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/ResumeTargetExecution.hpp b/src/EventManager/Events/ResumeTargetExecution.hpp index 9faf2ba8..d7dd4308 100644 --- a/src/EventManager/Events/ResumeTargetExecution.hpp +++ b/src/EventManager/Events/ResumeTargetExecution.hpp @@ -13,7 +13,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = TargetExecutionResumed; - static inline EventType type = EventType::RESUME_TARGET_EXECUTION; + static constexpr EventType type = EventType::RESUME_TARGET_EXECUTION; static inline const std::string name = "ResumeTargetExecutionEvent"; std::optional fromProgramCounter; diff --git a/src/EventManager/Events/RetrieveMemoryFromTarget.hpp b/src/EventManager/Events/RetrieveMemoryFromTarget.hpp index 6c45699a..7ec96d0f 100644 --- a/src/EventManager/Events/RetrieveMemoryFromTarget.hpp +++ b/src/EventManager/Events/RetrieveMemoryFromTarget.hpp @@ -14,7 +14,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = MemoryRetrievedFromTarget; - static inline EventType type = EventType::RETRIEVE_MEMORY_FROM_TARGET; + static constexpr EventType type = EventType::RETRIEVE_MEMORY_FROM_TARGET; static inline const std::string name = "RetrieveMemoryFromTarget"; Targets::TargetMemoryType memoryType = Targets::TargetMemoryType::RAM; std::uint32_t startAddress = 0; diff --git a/src/EventManager/Events/RetrieveRegistersFromTarget.hpp b/src/EventManager/Events/RetrieveRegistersFromTarget.hpp index 8cd6fbdb..9fcf142e 100644 --- a/src/EventManager/Events/RetrieveRegistersFromTarget.hpp +++ b/src/EventManager/Events/RetrieveRegistersFromTarget.hpp @@ -13,7 +13,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = RegistersRetrievedFromTarget; - static inline EventType type = EventType::RETRIEVE_REGISTERS_FROM_TARGET; + static constexpr EventType type = EventType::RETRIEVE_REGISTERS_FROM_TARGET; static inline const std::string name = "RetrieveRegistersFromTarget"; Targets::TargetRegisterDescriptors descriptors; diff --git a/src/EventManager/Events/RetrieveStackPointerFromTarget.hpp b/src/EventManager/Events/RetrieveStackPointerFromTarget.hpp index 52e2b97f..dd055fb1 100644 --- a/src/EventManager/Events/RetrieveStackPointerFromTarget.hpp +++ b/src/EventManager/Events/RetrieveStackPointerFromTarget.hpp @@ -12,7 +12,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = StackPointerRetrievedFromTarget; - static inline EventType type = EventType::RETRIEVE_STACK_POINTER_FROM_TARGET; + static constexpr EventType type = EventType::RETRIEVE_STACK_POINTER_FROM_TARGET; static inline const std::string name = "RetrieveStackPointerFromTarget"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/RetrieveTargetPinStates.hpp b/src/EventManager/Events/RetrieveTargetPinStates.hpp index 59a90eaa..7d920195 100644 --- a/src/EventManager/Events/RetrieveTargetPinStates.hpp +++ b/src/EventManager/Events/RetrieveTargetPinStates.hpp @@ -12,7 +12,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = TargetPinStatesRetrieved; - static inline EventType type = EventType::RETRIEVE_TARGET_PIN_STATES; + static constexpr EventType type = EventType::RETRIEVE_TARGET_PIN_STATES; static inline const std::string name = "RetrieveTargetPinStates"; int variantId = 0; diff --git a/src/EventManager/Events/SetBreakpointOnTarget.hpp b/src/EventManager/Events/SetBreakpointOnTarget.hpp index fb3087e1..2a9ac02d 100644 --- a/src/EventManager/Events/SetBreakpointOnTarget.hpp +++ b/src/EventManager/Events/SetBreakpointOnTarget.hpp @@ -14,7 +14,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = BreakpointSetOnTarget; - static inline EventType type = EventType::SET_BREAKPOINT_ON_TARGET; + static constexpr EventType type = EventType::SET_BREAKPOINT_ON_TARGET; static inline const std::string name = "SetBreakpointOnTarget"; Targets::TargetBreakpoint breakpoint; diff --git a/src/EventManager/Events/SetProgramCounterOnTarget.hpp b/src/EventManager/Events/SetProgramCounterOnTarget.hpp index e893a085..7a441ab7 100644 --- a/src/EventManager/Events/SetProgramCounterOnTarget.hpp +++ b/src/EventManager/Events/SetProgramCounterOnTarget.hpp @@ -13,7 +13,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = ProgramCounterSetOnTarget; - static inline EventType type = EventType::SET_PROGRAM_COUNTER_ON_TARGET; + static constexpr EventType type = EventType::SET_PROGRAM_COUNTER_ON_TARGET; static inline const std::string name = "SetProgramCounterOnTarget"; std::uint32_t address = 0; diff --git a/src/EventManager/Events/SetTargetPinState.hpp b/src/EventManager/Events/SetTargetPinState.hpp index 64a2697b..197adfb6 100644 --- a/src/EventManager/Events/SetTargetPinState.hpp +++ b/src/EventManager/Events/SetTargetPinState.hpp @@ -13,7 +13,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = TargetPinStatesRetrieved; - static inline EventType type = EventType::SET_TARGET_PIN_STATE; + static constexpr EventType type = EventType::SET_TARGET_PIN_STATE; static inline const std::string name = "SetTargetPinState"; Targets::TargetPinDescriptor pinDescriptor; Targets::TargetPinState pinState; diff --git a/src/EventManager/Events/ShutdownApplication.hpp b/src/EventManager/Events/ShutdownApplication.hpp index cfd7a1fe..a59f8b3d 100644 --- a/src/EventManager/Events/ShutdownApplication.hpp +++ b/src/EventManager/Events/ShutdownApplication.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class ShutdownApplication: public Event { public: - static inline EventType type = EventType::SHUTDOWN_APPLICATION; + static constexpr EventType type = EventType::SHUTDOWN_APPLICATION; static inline const std::string name = "ShutdownApplicationEvent"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/ShutdownDebugServer.hpp b/src/EventManager/Events/ShutdownDebugServer.hpp index fa04c6d3..68c8aad7 100644 --- a/src/EventManager/Events/ShutdownDebugServer.hpp +++ b/src/EventManager/Events/ShutdownDebugServer.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class ShutdownDebugServer: public Event { public: - static inline EventType type = EventType::SHUTDOWN_DEBUG_SERVER; + static constexpr EventType type = EventType::SHUTDOWN_DEBUG_SERVER; static inline const std::string name = "ShutdownDebugServer"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/ShutdownTargetController.hpp b/src/EventManager/Events/ShutdownTargetController.hpp index dc56bc64..7882f740 100644 --- a/src/EventManager/Events/ShutdownTargetController.hpp +++ b/src/EventManager/Events/ShutdownTargetController.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class ShutdownTargetController: public Event { public: - static inline EventType type = EventType::SHUTDOWN_TARGET_CONTROLLER; + static constexpr EventType type = EventType::SHUTDOWN_TARGET_CONTROLLER; static inline const std::string name = "ShutdownTargetControllerEvent"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/StackPointerRetrievedFromTarget.hpp b/src/EventManager/Events/StackPointerRetrievedFromTarget.hpp index e518a867..0a188b09 100644 --- a/src/EventManager/Events/StackPointerRetrievedFromTarget.hpp +++ b/src/EventManager/Events/StackPointerRetrievedFromTarget.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class StackPointerRetrievedFromTarget: public Event { public: - static inline EventType type = EventType::STACK_POINTER_RETRIEVED_FROM_TARGET; + static constexpr EventType type = EventType::STACK_POINTER_RETRIEVED_FROM_TARGET; static inline const std::string name = "StackPointerRetrievedFromTarget"; std::uint32_t stackPointer = 0; diff --git a/src/EventManager/Events/StepTargetExecution.hpp b/src/EventManager/Events/StepTargetExecution.hpp index 48919995..1503ae5a 100644 --- a/src/EventManager/Events/StepTargetExecution.hpp +++ b/src/EventManager/Events/StepTargetExecution.hpp @@ -13,7 +13,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = TargetExecutionResumed; - static inline EventType type = EventType::STEP_TARGET_EXECUTION; + static constexpr EventType type = EventType::STEP_TARGET_EXECUTION; static inline const std::string name = "StepTargetExecution"; std::optional fromProgramCounter; diff --git a/src/EventManager/Events/StopTargetExecution.hpp b/src/EventManager/Events/StopTargetExecution.hpp index 34c96032..e754296a 100644 --- a/src/EventManager/Events/StopTargetExecution.hpp +++ b/src/EventManager/Events/StopTargetExecution.hpp @@ -12,7 +12,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = TargetExecutionStopped; - static inline EventType type = EventType::STOP_TARGET_EXECUTION; + static constexpr EventType type = EventType::STOP_TARGET_EXECUTION; static inline const std::string name = "StopTargetExecution"; [[nodiscard]] EventType getType() const override { diff --git a/src/EventManager/Events/TargetControllerErrorOccurred.hpp b/src/EventManager/Events/TargetControllerErrorOccurred.hpp index 618b6a1a..c3d6a2e3 100644 --- a/src/EventManager/Events/TargetControllerErrorOccurred.hpp +++ b/src/EventManager/Events/TargetControllerErrorOccurred.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class TargetControllerErrorOccurred: public Event { public: - static inline EventType type = EventType::TARGET_CONTROLLER_ERROR_OCCURRED; + static constexpr EventType type = EventType::TARGET_CONTROLLER_ERROR_OCCURRED; static inline const std::string name = "TargetControllerErrorOccurred"; std::string errorMessage; diff --git a/src/EventManager/Events/TargetControllerStateReported.hpp b/src/EventManager/Events/TargetControllerStateReported.hpp index 498b756e..1ed59d7b 100644 --- a/src/EventManager/Events/TargetControllerStateReported.hpp +++ b/src/EventManager/Events/TargetControllerStateReported.hpp @@ -10,7 +10,7 @@ namespace Bloom::Events class TargetControllerStateReported: public Event { public: - static inline EventType type = EventType::TARGET_CONTROLLER_STATE_REPORTED; + static constexpr EventType type = EventType::TARGET_CONTROLLER_STATE_REPORTED; static inline const std::string name = "TargetControllerStateReported"; TargetControllerState state; diff --git a/src/EventManager/Events/TargetControllerThreadStateChanged.hpp b/src/EventManager/Events/TargetControllerThreadStateChanged.hpp index a423513e..eea7c373 100644 --- a/src/EventManager/Events/TargetControllerThreadStateChanged.hpp +++ b/src/EventManager/Events/TargetControllerThreadStateChanged.hpp @@ -10,7 +10,7 @@ namespace Bloom::Events class TargetControllerThreadStateChanged: public Event { public: - static inline EventType type = EventType::TARGET_CONTROLLER_THREAD_STATE_CHANGED; + static constexpr EventType type = EventType::TARGET_CONTROLLER_THREAD_STATE_CHANGED; static inline const std::string name = "TargetControllerThreadStateChanged"; explicit TargetControllerThreadStateChanged(ThreadState state): state(state) {}; diff --git a/src/EventManager/Events/TargetDescriptorExtracted.hpp b/src/EventManager/Events/TargetDescriptorExtracted.hpp index 85f16460..00226d2a 100644 --- a/src/EventManager/Events/TargetDescriptorExtracted.hpp +++ b/src/EventManager/Events/TargetDescriptorExtracted.hpp @@ -10,7 +10,7 @@ namespace Bloom::Events class TargetDescriptorExtracted: public Event { public: - static inline EventType type = EventType::TARGET_DESCRIPTOR_EXTRACTED; + static constexpr EventType type = EventType::TARGET_DESCRIPTOR_EXTRACTED; static inline const std::string name = "TargetDescriptorExtracted"; Targets::TargetDescriptor targetDescriptor; diff --git a/src/EventManager/Events/TargetExecutionResumed.hpp b/src/EventManager/Events/TargetExecutionResumed.hpp index a876af26..0b626c04 100644 --- a/src/EventManager/Events/TargetExecutionResumed.hpp +++ b/src/EventManager/Events/TargetExecutionResumed.hpp @@ -9,7 +9,7 @@ namespace Bloom::Events class TargetExecutionResumed: public Event { public: - static inline EventType type = EventType::TARGET_EXECUTION_RESUMED; + static constexpr EventType type = EventType::TARGET_EXECUTION_RESUMED; static inline const std::string name = "TargetExecutionResumed"; TargetExecutionResumed() = default; diff --git a/src/EventManager/Events/TargetExecutionStopped.hpp b/src/EventManager/Events/TargetExecutionStopped.hpp index 2412e2c4..b3565d00 100644 --- a/src/EventManager/Events/TargetExecutionStopped.hpp +++ b/src/EventManager/Events/TargetExecutionStopped.hpp @@ -11,7 +11,7 @@ namespace Bloom::Events class TargetExecutionStopped: public Event { public: - static inline EventType type = EventType::TARGET_EXECUTION_STOPPED; + static constexpr EventType type = EventType::TARGET_EXECUTION_STOPPED; static inline const std::string name = "TargetExecutionStopped"; std::uint32_t programCounter; Targets::TargetBreakCause breakCause; diff --git a/src/EventManager/Events/TargetPinStatesRetrieved.hpp b/src/EventManager/Events/TargetPinStatesRetrieved.hpp index 2e4ccc07..ed04658c 100644 --- a/src/EventManager/Events/TargetPinStatesRetrieved.hpp +++ b/src/EventManager/Events/TargetPinStatesRetrieved.hpp @@ -11,7 +11,7 @@ namespace Bloom::Events class TargetPinStatesRetrieved: public Event { public: - static inline EventType type = EventType::TARGET_PIN_STATES_RETRIEVED; + static constexpr EventType type = EventType::TARGET_PIN_STATES_RETRIEVED; static inline const std::string name = "TargetPinStatesRetrieved"; int variantId = 0; std::map pinSatesByNumber; diff --git a/src/EventManager/Events/WriteMemoryToTarget.hpp b/src/EventManager/Events/WriteMemoryToTarget.hpp index 57e53c75..9ef06cef 100644 --- a/src/EventManager/Events/WriteMemoryToTarget.hpp +++ b/src/EventManager/Events/WriteMemoryToTarget.hpp @@ -15,7 +15,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = MemoryWrittenToTarget; - static inline EventType type = EventType::WRITE_MEMORY_TO_TARGET; + static constexpr EventType type = EventType::WRITE_MEMORY_TO_TARGET; static inline const std::string name = "WriteMemoryToTarget"; Targets::TargetMemoryType memoryType = Targets::TargetMemoryType::RAM; std::uint32_t startAddress = 0; diff --git a/src/EventManager/Events/WriteRegistersToTarget.hpp b/src/EventManager/Events/WriteRegistersToTarget.hpp index c325e381..cbc441b6 100644 --- a/src/EventManager/Events/WriteRegistersToTarget.hpp +++ b/src/EventManager/Events/WriteRegistersToTarget.hpp @@ -14,7 +14,7 @@ namespace Bloom::Events public: using TargetControllerResponseType = RegistersWrittenToTarget; - static inline EventType type = EventType::WRITE_REGISTERS_TO_TARGET; + static constexpr EventType type = EventType::WRITE_REGISTERS_TO_TARGET; static inline const std::string name = "WriteRegistersToTarget"; Targets::TargetRegisters registers; diff --git a/src/Insight/InsightWorker/Tasks/InsightWorkerTask.hpp b/src/Insight/InsightWorker/Tasks/InsightWorkerTask.hpp index fcfd4cb3..46896da2 100644 --- a/src/Insight/InsightWorker/Tasks/InsightWorkerTask.hpp +++ b/src/Insight/InsightWorker/Tasks/InsightWorkerTask.hpp @@ -20,7 +20,7 @@ namespace Bloom Q_OBJECT public: - InsightWorkerTaskState state; + InsightWorkerTaskState state = InsightWorkerTaskState::CREATED; InsightWorkerTask(): QObject(nullptr) {}; diff --git a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp index c486d771..bfbc824d 100644 --- a/src/Targets/Microchip/AVR/AVR8/Avr8.cpp +++ b/src/Targets/Microchip/AVR/AVR8/Avr8.cpp @@ -203,7 +203,7 @@ TargetRegisters Avr8::readRegisters(TargetRegisterDescriptors descriptors) { TargetRegisters registers; for (auto registerDescriptorIt = descriptors.begin(); registerDescriptorIt != descriptors.end();) { - auto& descriptor = *registerDescriptorIt; + const auto& descriptor = *registerDescriptorIt; if (descriptor.type == TargetRegisterType::PROGRAM_COUNTER) { registers.push_back(this->getProgramCounterRegister());