From 838318ea2c5339321dd5e1528d35228f9d390679 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Sun, 1 Nov 2020 09:51:57 -0330 Subject: [PATCH] Slight refactor of label array in DeveloperDialog. - This is a followup to the last commit for this class - We don't need this to be a static in the header file itself --- src/gui/DeveloperDialog.cxx | 8 ++------ src/gui/DeveloperDialog.hxx | 2 -- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/gui/DeveloperDialog.cxx b/src/gui/DeveloperDialog.cxx index bf681f6e0..6c877351a 100644 --- a/src/gui/DeveloperDialog.cxx +++ b/src/gui/DeveloperDialog.cxx @@ -154,11 +154,12 @@ void DeveloperDialog::addEmulationTab(const GUI::Font& font) myRandomizeCPULabel = new StaticTextWidget(myTab, font, HBORDER + INDENT * 2, ypos + 1, "Randomize CPU "); wid.push_back(myRandomizeCPULabel); + const std::array cpuregsLabels = {"SP", "A", "X", "Y", "PS"}; int xpos = myRandomizeCPULabel->getRight() + fontWidth * 1.25; for(int i = 0; i < 5; ++i) { myRandomizeCPUWidget[i] = new CheckboxWidget(myTab, font, xpos, ypos + 1, - ourCPUregs[i], kRandCPUID); + cpuregsLabels[i], kRandCPUID); wid.push_back(myRandomizeCPUWidget[i]); xpos += CheckboxWidget::boxSize(font) + font.getStringWidth("XX") + fontWidth * 2.5; } @@ -1535,8 +1536,3 @@ void DeveloperDialog::handleFontSize() myDebuggerHeightSlider->setValue(minH); #endif } - -// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -const std::array DeveloperDialog::ourCPUregs = { - "SP", "A", "X", "Y", "PS" -}; diff --git a/src/gui/DeveloperDialog.hxx b/src/gui/DeveloperDialog.hxx index f66d58378..e3d31ecfd 100644 --- a/src/gui/DeveloperDialog.hxx +++ b/src/gui/DeveloperDialog.hxx @@ -184,8 +184,6 @@ class DeveloperDialog : public Dialog std::array myStateInterval; std::array myStateHorizon; - static const std::array ourCPUregs; - private: void addEmulationTab(const GUI::Font& font); void addTimeMachineTab(const GUI::Font& font);