diff --git a/src/DebugToolDrivers/Protocols/RiscVDebug/DebugTranslator.cpp b/src/DebugToolDrivers/Protocols/RiscVDebug/DebugTranslator.cpp index 70368350..7a2e05e8 100644 --- a/src/DebugToolDrivers/Protocols/RiscVDebug/DebugTranslator.cpp +++ b/src/DebugToolDrivers/Protocols/RiscVDebug/DebugTranslator.cpp @@ -1120,7 +1120,7 @@ namespace DebugToolDrivers::Protocols::RiscVDebug * data0 (from X9) and the program buffer being executed again (filling X9 with another word). * * To avoid reading an excess of words (which could result in an out-of-bounds exception), we only enable - * auto execution if we require more data that what has already been read. + * auto execution if we require more data than what has already been read. */ const auto autoExecutionEnabled = bytes > (DebugTranslator::WORD_BYTE_SIZE * 2); this->dtmInterface.writeDebugModuleRegister( diff --git a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerItemRenderer.cpp b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerItemRenderer.cpp index 789744ba..f48b4aa2 100644 --- a/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerItemRenderer.cpp +++ b/src/Insight/UserInterfaces/InsightWindow/Widgets/TargetMemoryInspectionPane/HexViewerWidget/HexViewerItemRenderer.cpp @@ -643,8 +643,8 @@ namespace Widgets static constexpr auto asciiFontColor = QColor{0xA7, 0x77, 0x26}; static constexpr auto changedMemoryAsciiFontColor = QColor{0xB7, 0x7F, 0x21}; - const auto byteItemRect = QRect{0, 0, ByteItem::WIDTH, ByteItem::HEIGHT}; - const auto byteItemSize = byteItemRect.size(); + static constexpr auto byteItemRect = QRect{0, 0, ByteItem::WIDTH, ByteItem::HEIGHT}; + static constexpr auto byteItemSize = byteItemRect.size(); auto standardTemplatePixmap = QPixmap{byteItemSize}; standardTemplatePixmap.fill(standardBackgroundColor); diff --git a/src/Targets/Microchip/Avr8/OpcodeDecoder/Instruction.hpp b/src/Targets/Microchip/Avr8/OpcodeDecoder/Instruction.hpp index 7984bf7a..46a3dac6 100644 --- a/src/Targets/Microchip/Avr8/OpcodeDecoder/Instruction.hpp +++ b/src/Targets/Microchip/Avr8/OpcodeDecoder/Instruction.hpp @@ -33,58 +33,16 @@ namespace Targets::Microchip::Avr8::OpcodeDecoder std::uint8_t byteSize; Mnemonic mnemonic; bool canChangeProgramFlow; - - std::optional data; - - std::optional sourceRegister; - std::optional destinationRegister; - - std::optional programWordAddress; - std::optional programWordAddressOffset; - bool canSkipNextInstruction; - - std::optional registerBitPosition; - std::optional statusRegisterBitPosition; - - std::optional ioSpaceAddress; - std::optional dataSpaceAddress; - - std::optional displacement; - - Instruction( - const std::string& name, - std::uint32_t opcode, - std::uint8_t byteSize, - Mnemonic mnemonic, - bool canChangeProgramFlow, - std::optional data = std::nullopt, - std::optional sourceRegister = std::nullopt, - std::optional destinationRegister = std::nullopt, - std::optional programWordAddress = std::nullopt, - std::optional programWordAddressOffset = std::nullopt, - bool canSkipNextInstruction = false, - std::optional registerBitPosition = std::nullopt, - std::optional statusRegisterBitPosition = std::nullopt, - std::optional ioSpaceAddress = std::nullopt, - std::optional dataSpaceAddress = std::nullopt, - std::optional displacement = std::nullopt - ) - : name(name) - , opcode(opcode) - , byteSize(byteSize) - , mnemonic(mnemonic) - , canChangeProgramFlow(canChangeProgramFlow) - , data(data) - , sourceRegister(sourceRegister) - , destinationRegister(destinationRegister) - , programWordAddress(programWordAddress) - , programWordAddressOffset(programWordAddressOffset) - , canSkipNextInstruction(canSkipNextInstruction) - , registerBitPosition(registerBitPosition) - , statusRegisterBitPosition(statusRegisterBitPosition) - , ioSpaceAddress(ioSpaceAddress) - , dataSpaceAddress(dataSpaceAddress) - , displacement(displacement) - {} + std::optional data = std::nullopt; + std::optional sourceRegister = std::nullopt; + std::optional destinationRegister = std::nullopt; + std::optional programWordAddress = std::nullopt; + std::optional programWordAddressOffset = std::nullopt; + bool canSkipNextInstruction = false; + std::optional registerBitPosition = std::nullopt; + std::optional statusRegisterBitPosition = std::nullopt; + std::optional ioSpaceAddress = std::nullopt; + std::optional dataSpaceAddress = std::nullopt; + std::optional displacement = std::nullopt; }; } diff --git a/src/Targets/Microchip/Avr8/OpcodeDecoder/Opcode.hpp b/src/Targets/Microchip/Avr8/OpcodeDecoder/Opcode.hpp index b9248894..4663a654 100644 --- a/src/Targets/Microchip/Avr8/OpcodeDecoder/Opcode.hpp +++ b/src/Targets/Microchip/Avr8/OpcodeDecoder/Opcode.hpp @@ -521,11 +521,11 @@ namespace Targets::Microchip::Avr8::OpcodeDecoder } auto output = Instruction{ - SelfType::name, - opcode, - byteSize, - mnemonic, - canChangeProgramFlow + .name = SelfType::name, + .opcode = opcode, + .byteSize = byteSize, + .mnemonic = mnemonic, + .canChangeProgramFlow = canChangeProgramFlow, }; if constexpr (decltype(sourceRegisterParameter)::hasValue()) {