Skip to content

Commit 2c17967

Browse files
authored
Beautified code of GOPipe::Load (#1803)
1 parent 4c842a1 commit 2c17967

File tree

9 files changed

+7501
-5854
lines changed

9 files changed

+7501
-5854
lines changed

ide-projects/NetBeans12/nbproject/configurations.xml

+7,484-5,826
Large diffs are not rendered by default.

src/grandorgue/CMakeLists.txt

-1
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ model/GOCacheObject.cpp
160160
model/GOCoupler.cpp
161161
model/GODivisionalCoupler.cpp
162162
model/GODrawStop.cpp
163-
model/GODummyPipe.cpp
164163
model/GOEnclosure.cpp
165164
model/GOEventHandlerList.cpp
166165
model/GOManual.cpp

src/grandorgue/model/GODummyPipe.cpp

-16
This file was deleted.

src/grandorgue/model/GODummyPipe.h

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2006 Milan Digital Audio LLC
3-
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
3+
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
44
* License GPL-2.0 or later
55
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
66
*/
@@ -12,13 +12,15 @@
1212

1313
class GODummyPipe : public GOPipe {
1414
private:
15-
void VelocityChanged(unsigned velocity, unsigned old_velocity);
15+
void VelocityChanged(unsigned velocity, unsigned old_velocity) override {}
1616

1717
public:
1818
GODummyPipe(
19-
GOEventHandlerList *handlerList, GORank *rank, unsigned midi_key_number);
19+
GOEventHandlerList *handlerList, GORank *rank, unsigned midi_key_number)
20+
: GOPipe(handlerList, rank, midi_key_number) {}
2021

21-
void Load(GOConfigReader &cfg, wxString group, wxString prefix);
22+
void Load(GOConfigReader &cfg, const wxString &group, const wxString &prefix)
23+
override {}
2224
};
2325

2426
#endif

src/grandorgue/model/GOPipe.h

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/*
22
* Copyright 2006 Milan Digital Audio LLC
3-
* Copyright 2009-2023 GrandOrgue contributors (see AUTHORS)
3+
* Copyright 2009-2024 GrandOrgue contributors (see AUTHORS)
44
* License GPL-2.0 or later
55
* (https://www.gnu.org/licenses/old-licenses/gpl-2.0.html).
66
*/
@@ -41,7 +41,9 @@ class GOPipe : protected GOSoundStateHandler {
4141
GOPipe(
4242
GOEventHandlerList *handlerList, GORank *rank, unsigned midi_key_number);
4343
virtual ~GOPipe();
44-
virtual void Load(GOConfigReader &cfg, wxString group, wxString prefix) = 0;
44+
virtual void Load(
45+
GOConfigReader &cfg, const wxString &group, const wxString &prefix)
46+
= 0;
4547
/**
4648
* Called from GORank when a user presses the key
4749
* @param velocity the velocity value of the midi event

src/grandorgue/model/GOReferencePipe.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ GOReferencePipe::GOReferencePipe(
2626
m_Filename() {}
2727

2828
void GOReferencePipe::Load(
29-
GOConfigReader &cfg, wxString group, wxString prefix) {
29+
GOConfigReader &cfg, const wxString &group, const wxString &prefix) {
3030
SetGroupAndPrefix(group, prefix);
3131
m_model->RegisterCacheObject(this);
3232
m_Filename = cfg.ReadStringTrim(ODFSetting, group, prefix);

src/grandorgue/model/GOReferencePipe.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class GOReferencePipe : public GOPipe, private GOCacheObject {
3232
public:
3333
GOReferencePipe(GOOrganModel *model, GORank *rank, unsigned midi_key_number);
3434

35-
void Load(GOConfigReader &cfg, wxString group, wxString prefix);
35+
void Load(GOConfigReader &cfg, const wxString &group, const wxString &prefix)
36+
override;
3637
};
3738

3839
#endif

src/grandorgue/model/GOSoundingPipe.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ void GOSoundingPipe::LoadReleaseFileInfo(
220220
}
221221

222222
void GOSoundingPipe::Load(
223-
GOConfigReader &cfg, wxString group, wxString prefix) {
223+
GOConfigReader &cfg, const wxString &group, const wxString &prefix) {
224224
SetGroupAndPrefix(group, prefix);
225225
p_OrganModel->RegisterCacheObject(this);
226226
m_Filename = cfg.ReadStringTrim(ODFSetting, group, prefix);

src/grandorgue/model/GOSoundingPipe.h

+3-2
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ class GOSoundingPipe : public GOPipe,
113113

114114
public:
115115
GOSoundingPipe(
116-
GOOrganModel *organController,
116+
GOOrganModel *pOrganModel,
117117
GORank *rank,
118118
bool percussive,
119119
int sampler_group_id,
@@ -128,7 +128,8 @@ class GOSoundingPipe : public GOPipe,
128128
const wxString &group,
129129
const wxString &prefix,
130130
const wxString &filename);
131-
void Load(GOConfigReader &cfg, wxString group, wxString prefix);
131+
void Load(GOConfigReader &cfg, const wxString &group, const wxString &prefix)
132+
override;
132133
};
133134

134135
#endif

0 commit comments

Comments
 (0)