Skip to content

Commit

Permalink
Changed passing parameters to GODrawStop::Init, GODrawStop::Load and …
Browse files Browse the repository at this point in the history
…to the same methods in the subclasses
  • Loading branch information
oleg68 committed Oct 5, 2024
1 parent 8e250a1 commit 726ce0d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/grandorgue/model/GOCoupler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ void GOCoupler::Init(
= r_OrganModel.GetManual(m_DestinationManual)->RegisterCoupler(this);
}

void GOCoupler::Load(GOConfigReader &cfg, wxString group) {
void GOCoupler::Load(GOConfigReader &cfg, const wxString &group) {
m_UnisonOff
= cfg.ReadBoolean(ODFSetting, group, wxT("UnisonOff"), true, false);
m_DestinationManual = cfg.ReadInteger(
Expand Down
2 changes: 1 addition & 1 deletion src/grandorgue/model/GOCoupler.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ class GOCoupler : public GODrawstop {
int keyshift,
int dest_manual,
GOCouplerType coupler_type);
void Load(GOConfigReader &cfg, wxString group);
void Load(GOConfigReader &cfg, const wxString &group);

// send key states for all chained couplers
void RefreshState();
Expand Down
5 changes: 3 additions & 2 deletions src/grandorgue/model/GODrawStop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ void GODrawstop::RegisterControlled(GODrawstop *sw) {
m_ControlledDrawstops.push_back(sw);
}

void GODrawstop::Init(GOConfigReader &cfg, wxString group, wxString name) {
void GODrawstop::Init(
GOConfigReader &cfg, const wxString &group, const wxString &name) {
m_Type = FUNCTION_INPUT;
m_Engaged = cfg.ReadBoolean(CMBSetting, group, wxT("DefaultToEngaged"));
m_GCState = 0;
Expand All @@ -58,7 +59,7 @@ void GODrawstop::SetupIsToStoreInCmb() {
|| isControlledByUser;
}

void GODrawstop::Load(GOConfigReader &cfg, wxString group) {
void GODrawstop::Load(GOConfigReader &cfg, const wxString &group) {
m_Type = (GOFunctionType)cfg.ReadEnum(
ODFSetting,
group,
Expand Down
4 changes: 2 additions & 2 deletions src/grandorgue/model/GODrawStop.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,8 @@ class GODrawstop : public GOButtonControl, virtual public GOCombinationElement {
bool IsActive() const { return m_ActiveState; }
bool GetCombinationState() const override { return IsEngaged(); }

void Init(GOConfigReader &cfg, wxString group, wxString name);
void Load(GOConfigReader &cfg, wxString group);
void Init(GOConfigReader &cfg, const wxString &group, const wxString &name);
void Load(GOConfigReader &cfg, const wxString &group);
void RegisterControlled(GODrawstop *sw);
virtual void SetButtonState(bool on) override;
virtual void Update();
Expand Down
2 changes: 1 addition & 1 deletion src/grandorgue/model/GOStop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ unsigned GOStop::IsAuto() const {
return (m_RankInfo.size() == 1 && m_RankInfo[0].Rank->GetPipeCount() == 1);
}

void GOStop::Load(GOConfigReader &cfg, wxString group) {
void GOStop::Load(GOConfigReader &cfg, const wxString &group) {
unsigned number_of_ranks = cfg.ReadInteger(
ODFSetting, group, wxT("NumberOfRanks"), 0, 999, false, 0);

Expand Down
2 changes: 1 addition & 1 deletion src/grandorgue/model/GOStop.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class GOStop : public GODrawstop {
public:
GOStop(GOOrganModel &organModel, unsigned first_midi_note_number);
GORank *GetRank(unsigned index);
void Load(GOConfigReader &cfg, wxString group);
void Load(GOConfigReader &cfg, const wxString &group);
void SetKey(unsigned note, unsigned velocity);
~GOStop(void);

Expand Down

0 comments on commit 726ce0d

Please sign in to comment.