Corrected member initialisation order (addressing -Wreorder warnings)
This commit is contained in:
@@ -120,6 +120,7 @@ target_compile_options(
|
||||
PUBLIC -Wpessimizing-move
|
||||
PUBLIC -Wredundant-move
|
||||
PUBLIC -Wsuggest-override
|
||||
PUBLIC -Wreorder
|
||||
PUBLIC -fno-sized-deallocation
|
||||
PUBLIC $<$<CONFIG:DEBUG>:-g>
|
||||
# PUBLIC $<$<CONFIG:DEBUG>:-O0>
|
||||
|
||||
@@ -43,8 +43,8 @@ namespace DebugServer::Gdb
|
||||
Connection& operator = (Connection&&) = delete;
|
||||
|
||||
Connection(Connection&& other) noexcept
|
||||
: interruptEventNotifier(other.interruptEventNotifier)
|
||||
, socketFileDescriptor(other.socketFileDescriptor)
|
||||
: socketFileDescriptor(other.socketFileDescriptor)
|
||||
, interruptEventNotifier(other.interruptEventNotifier)
|
||||
, epollInstance(std::move(other.epollInstance))
|
||||
, readInterruptEnabled(other.readInterruptEnabled)
|
||||
{
|
||||
|
||||
@@ -10,9 +10,9 @@ namespace DebugServer::Gdb
|
||||
std::map<GdbRegisterId, Targets::TargetRegisterDescriptorId> targetRegisterDescriptorIdsByGdbRegisterId
|
||||
)
|
||||
: targetDescriptor(targetDescriptor)
|
||||
, gdbRegisterDescriptorsById(gdbRegisterDescriptorsById)
|
||||
, memoryOffsetsByType(memoryOffsetsByType)
|
||||
, memoryOffsets(memoryOffsetsByType.getValues())
|
||||
, gdbRegisterDescriptorsById(gdbRegisterDescriptorsById)
|
||||
, gdbRegisterIdsByTargetRegisterDescriptorId(gdbRegisterIdsByTargetRegisterDescriptorId)
|
||||
, targetRegisterDescriptorIdsByGdbRegisterId(targetRegisterDescriptorIdsByGdbRegisterId)
|
||||
{}
|
||||
|
||||
@@ -96,9 +96,9 @@ namespace DebugToolDrivers::Protocols::CmsisDap::Edbg::Avr
|
||||
: edbgInterface(edbgInterface)
|
||||
, targetConfig(targetConfig)
|
||||
, family(targetFamily)
|
||||
, configVariant(EdbgAvr8Interface::resolveConfigVariant(targetFamily, targetConfig.physicalInterface))
|
||||
, targetParameters(targetParameters)
|
||||
, targetRegisterDescriptorsById(targetRegisterDescriptorsById)
|
||||
, configVariant(EdbgAvr8Interface::resolveConfigVariant(targetFamily, targetConfig.physicalInterface))
|
||||
{}
|
||||
|
||||
void EdbgAvr8Interface::init() {
|
||||
|
||||
@@ -16,8 +16,8 @@ namespace Usb
|
||||
std::uint16_t productId
|
||||
)
|
||||
: interfaceNumber(interfaceNumber)
|
||||
, vendorId(vendorId)
|
||||
, inputReportSize(inputReportSize)
|
||||
, vendorId(vendorId)
|
||||
, productId(productId)
|
||||
{}
|
||||
|
||||
|
||||
@@ -150,9 +150,9 @@ Insight::Insight(
|
||||
void Insight::activateMainWindow() {
|
||||
if (this->mainWindow == nullptr) {
|
||||
this->mainWindow = new InsightWindow(
|
||||
this->environmentConfig,
|
||||
this->insightConfig,
|
||||
this->insightProjectSettings,
|
||||
this->insightConfig,
|
||||
this->environmentConfig,
|
||||
this->targetDescriptor
|
||||
);
|
||||
|
||||
|
||||
@@ -67,13 +67,14 @@ public:
|
||||
private:
|
||||
static constexpr std::uint8_t INSIGHT_WORKER_COUNT = 3;
|
||||
|
||||
EventListener& eventListener;
|
||||
|
||||
ProjectConfig projectConfig;
|
||||
EnvironmentConfig environmentConfig;
|
||||
InsightConfig insightConfig;
|
||||
|
||||
InsightProjectSettings& insightProjectSettings;
|
||||
|
||||
EventListener& eventListener;
|
||||
Services::TargetControllerService targetControllerService = Services::TargetControllerService();
|
||||
|
||||
Targets::TargetDescriptor targetDescriptor = this->targetControllerService.getTargetDescriptor();
|
||||
|
||||
@@ -34,7 +34,7 @@ protected:
|
||||
void run(Services::TargetControllerService&) override;
|
||||
|
||||
private:
|
||||
const Widgets::HexViewerSharedState& hexViewerState;
|
||||
const std::vector<FocusedMemoryRegion>& focusedMemoryRegions;
|
||||
const std::vector<ExcludedMemoryRegion>& excludedMemoryRegions;
|
||||
const Widgets::HexViewerSharedState& hexViewerState;
|
||||
};
|
||||
|
||||
@@ -30,16 +30,16 @@ using Targets::TargetPinDescriptor;
|
||||
using Targets::TargetMemoryType;
|
||||
|
||||
InsightWindow::InsightWindow(
|
||||
const EnvironmentConfig& environmentConfig,
|
||||
const InsightConfig& insightConfig,
|
||||
InsightProjectSettings& insightProjectSettings,
|
||||
const InsightConfig& insightConfig,
|
||||
const EnvironmentConfig& environmentConfig,
|
||||
const Targets::TargetDescriptor& targetDescriptor
|
||||
)
|
||||
: QMainWindow(nullptr)
|
||||
, insightProjectSettings(insightProjectSettings)
|
||||
, insightConfig(insightConfig)
|
||||
, environmentConfig(environmentConfig)
|
||||
, targetConfig(environmentConfig.targetConfig)
|
||||
, insightConfig(insightConfig)
|
||||
, insightProjectSettings(insightProjectSettings)
|
||||
, targetDescriptor(targetDescriptor)
|
||||
{
|
||||
this->setObjectName("main-window");
|
||||
|
||||
@@ -31,9 +31,9 @@ class InsightWindow: public QMainWindow
|
||||
|
||||
public:
|
||||
InsightWindow(
|
||||
const EnvironmentConfig& environmentConfig,
|
||||
const InsightConfig& insightConfig,
|
||||
InsightProjectSettings& insightProjectSettings,
|
||||
const InsightConfig& insightConfig,
|
||||
const EnvironmentConfig& environmentConfig,
|
||||
const Targets::TargetDescriptor& targetDescriptor
|
||||
);
|
||||
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
|
||||
namespace Widgets
|
||||
{
|
||||
LabeledSeparator::LabeledSeparator(QString title, QWidget* parent): title(std::move(title)), QWidget(parent) {
|
||||
LabeledSeparator::LabeledSeparator(QString title, QWidget* parent)
|
||||
: QWidget(parent)
|
||||
, title(std::move(title))
|
||||
{
|
||||
this->setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
|
||||
this->setFixedHeight(LabeledSeparator::DEFAULT_HEIGHT);
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ namespace Widgets
|
||||
ListScene::ListItemSetType&& items,
|
||||
QGraphicsView* parent
|
||||
)
|
||||
: parent(parent)
|
||||
, QGraphicsScene(parent)
|
||||
: QGraphicsScene(parent)
|
||||
, parent(parent)
|
||||
{
|
||||
this->setItemIndexMethod(QGraphicsScene::NoIndex);
|
||||
this->setItems(std::move(items));
|
||||
|
||||
@@ -3,9 +3,9 @@
|
||||
namespace Widgets
|
||||
{
|
||||
PaneWidget::PaneWidget(PaneState& state, PanelWidget* parent)
|
||||
: state(state)
|
||||
: QWidget(parent)
|
||||
, state(state)
|
||||
, parentPanel(parent)
|
||||
, QWidget(parent)
|
||||
{
|
||||
this->setMouseTracking(false);
|
||||
this->setAttribute(Qt::WA_Hover, true);
|
||||
|
||||
@@ -8,9 +8,9 @@
|
||||
namespace Widgets
|
||||
{
|
||||
PanelWidget::PanelWidget(PanelWidgetType type, PanelState& state, QWidget* parent)
|
||||
: panelType(type)
|
||||
: QFrame(parent)
|
||||
, state(state)
|
||||
, QFrame(parent)
|
||||
, panelType(type)
|
||||
{
|
||||
this->setMouseTracking(false);
|
||||
this->setAttribute(Qt::WA_Hover, true);
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
namespace Widgets
|
||||
{
|
||||
ByteAddressItem::ByteAddressItem(const HexViewerSharedState& hexViewerState, QGraphicsItem* parent)
|
||||
: hexViewerState(hexViewerState)
|
||||
, QGraphicsItem(parent)
|
||||
: QGraphicsItem(parent)
|
||||
, hexViewerState(hexViewerState)
|
||||
{}
|
||||
|
||||
void ByteAddressItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) {
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace Widgets
|
||||
std::optional<IsEnabledCallbackType> isEnabledCallback,
|
||||
QWidget* parent
|
||||
)
|
||||
: isEnabledCallback(isEnabledCallback)
|
||||
, QAction(text, parent)
|
||||
: QAction(text, parent)
|
||||
, isEnabledCallback(isEnabledCallback)
|
||||
{}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,10 @@ namespace Widgets
|
||||
static constexpr int RIGHT_MARGIN = 5;
|
||||
static constexpr int BOTTOM_MARGIN = 5;
|
||||
|
||||
HexViewerItem* parent = nullptr;
|
||||
|
||||
const Targets::TargetMemoryAddress startAddress = 0;
|
||||
|
||||
HexViewerItem* parent = nullptr;
|
||||
|
||||
QPoint relativePosition = {};
|
||||
|
||||
HexViewerItem(Targets::TargetMemoryAddress startAddress, HexViewerItem* parent = nullptr);
|
||||
|
||||
@@ -51,11 +51,11 @@ namespace Widgets
|
||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor;
|
||||
const std::optional<Targets::TargetMemoryBuffer>& data;
|
||||
|
||||
HexViewerWidgetSettings& settings;
|
||||
|
||||
const std::vector<FocusedMemoryRegion>& focusedMemoryRegions;
|
||||
const std::vector<ExcludedMemoryRegion>& excludedMemoryRegions;
|
||||
|
||||
HexViewerWidgetSettings& settings;
|
||||
|
||||
QWidget* container = nullptr;
|
||||
QWidget* toolBar = nullptr;
|
||||
QWidget* bottomBar = nullptr;
|
||||
|
||||
@@ -25,7 +25,8 @@ namespace Widgets
|
||||
HexViewerWidgetSettings& settings,
|
||||
QGraphicsView* parent
|
||||
)
|
||||
: state(
|
||||
: QGraphicsScene(parent)
|
||||
, state(
|
||||
HexViewerSharedState(
|
||||
targetMemoryDescriptor,
|
||||
data,
|
||||
@@ -35,7 +36,6 @@ namespace Widgets
|
||||
, focusedMemoryRegions(focusedMemoryRegions)
|
||||
, excludedMemoryRegions(excludedMemoryRegions)
|
||||
, parent(parent)
|
||||
, QGraphicsScene(parent)
|
||||
{
|
||||
this->setObjectName("byte-widget-container");
|
||||
|
||||
|
||||
@@ -13,7 +13,8 @@ namespace Widgets
|
||||
const Targets::TargetMemoryDescriptor& memoryDescriptor,
|
||||
QWidget* parent
|
||||
)
|
||||
: memoryRegion(region), RegionItem(region, memoryDescriptor, parent)
|
||||
: RegionItem(region, memoryDescriptor, parent)
|
||||
, memoryRegion(region)
|
||||
{
|
||||
auto formUiFile = QFile(
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
|
||||
@@ -15,7 +15,8 @@ namespace Widgets
|
||||
const Targets::TargetMemoryDescriptor& memoryDescriptor,
|
||||
QWidget* parent
|
||||
)
|
||||
: memoryRegion(region), RegionItem(region, memoryDescriptor, parent)
|
||||
: RegionItem(region, memoryDescriptor, parent)
|
||||
, memoryRegion(region)
|
||||
{
|
||||
auto formUiFile = QFile(
|
||||
QString::fromStdString(Services::PathService::compiledResourcesPath()
|
||||
|
||||
@@ -12,8 +12,8 @@ namespace Widgets
|
||||
const Targets::TargetMemoryDescriptor& memoryDescriptor,
|
||||
QWidget* parent
|
||||
)
|
||||
: memoryDescriptor(memoryDescriptor)
|
||||
, ClickableWidget(parent)
|
||||
: ClickableWidget(parent)
|
||||
, memoryDescriptor(memoryDescriptor)
|
||||
{
|
||||
this->setObjectName("region-item");
|
||||
this->setFixedHeight(50);
|
||||
|
||||
@@ -35,8 +35,6 @@ namespace Widgets
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
TargetMemoryInspectionPaneSettings& settings;
|
||||
|
||||
TargetMemoryInspectionPane(
|
||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor,
|
||||
TargetMemoryInspectionPaneSettings& settings,
|
||||
@@ -58,6 +56,8 @@ namespace Widgets
|
||||
private:
|
||||
const Targets::TargetMemoryDescriptor& targetMemoryDescriptor;
|
||||
|
||||
TargetMemoryInspectionPaneSettings& settings;
|
||||
|
||||
std::optional<Targets::TargetMemoryBuffer> data;
|
||||
std::optional<Targets::TargetStackPointer> stackPointer;
|
||||
std::optional<QSharedPointer<ReadTargetMemory>> activeRefreshTask;
|
||||
|
||||
@@ -21,8 +21,8 @@ namespace Targets::Microchip::Avr::Avr8Bit
|
||||
Avr8::Avr8(const TargetConfig& targetConfig)
|
||||
: targetConfig(Avr8TargetConfig(targetConfig))
|
||||
, targetDescriptionFile(TargetDescription::TargetDescriptionFile(this->targetConfig.name))
|
||||
, name(this->targetDescriptionFile.getTargetName())
|
||||
, signature(this->targetDescriptionFile.getTargetSignature())
|
||||
, name(this->targetDescriptionFile.getTargetName())
|
||||
, family(this->targetDescriptionFile.getFamily())
|
||||
, targetParameters(this->targetDescriptionFile.getTargetParameters())
|
||||
, supportedPhysicalInterfaces(this->targetDescriptionFile.getSupportedPhysicalInterfaces())
|
||||
|
||||
@@ -44,9 +44,9 @@ namespace Targets
|
||||
{
|
||||
public:
|
||||
TargetRegisterDescriptorId id;
|
||||
TargetRegisterType type;
|
||||
std::optional<TargetMemoryAddress> startAddress;
|
||||
TargetMemorySize size;
|
||||
TargetRegisterType type;
|
||||
TargetMemoryType memoryType;
|
||||
|
||||
std::optional<std::string> name;
|
||||
@@ -106,8 +106,8 @@ namespace Targets
|
||||
TargetMemoryBuffer value;
|
||||
|
||||
TargetRegister(TargetRegisterDescriptorId descriptorId, std::vector<unsigned char> value)
|
||||
: value(std::move(value))
|
||||
, descriptorId(descriptorId)
|
||||
: descriptorId(descriptorId)
|
||||
, value(std::move(value))
|
||||
{};
|
||||
|
||||
[[nodiscard]] std::size_t size() const {
|
||||
|
||||
Reference in New Issue
Block a user