Skip to content

Commit d5df2d5

Browse files
committed
guard retargeting edited pool samples to Adv only
1 parent 6e68c4f commit d5df2d5

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

sources/Application/Views/SampleEditorView.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1396,6 +1396,7 @@ void SampleEditorView::showLoadToPoolFailedDialog() {
13961396
*this));
13971397
}
13981398

1399+
#ifdef ADV
13991400
etl::vector<SampleInstrument *, MAX_INSTRUMENT_COUNT>
14001401
SampleEditorView::collectSampleUsers(int sampleIndex) const {
14011402
etl::vector<SampleInstrument *, MAX_INSTRUMENT_COUNT> users;
@@ -1425,13 +1426,13 @@ SampleEditorView::collectSampleUsers(int sampleIndex) const {
14251426
void SampleEditorView::retargetSampleUsers(
14261427
const etl::vector<SampleInstrument *, MAX_INSTRUMENT_COUNT> &users,
14271428
uint16_t newIndex) {
1428-
14291429
for (auto *sampleInstrument : users) {
14301430
if (sampleInstrument) {
14311431
sampleInstrument->AssignSample(newIndex);
14321432
}
14331433
}
14341434
}
1435+
#endif
14351436

14361437
bool SampleEditorView::syncSavedAsProjectPoolSample(
14371438
const etl::string<MAX_INSTRUMENT_FILENAME_LENGTH> &savedFilename) {

sources/Application/Views/SampleEditorView.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,13 @@ class SampleEditorView : public FieldView, public I_Observer {
7979
void confirmSave(bool loadToPool);
8080
void showSaveFailedDialog();
8181
void showLoadToPoolFailedDialog();
82+
#ifdef ADV
8283
etl::vector<SampleInstrument *, MAX_INSTRUMENT_COUNT>
8384
collectSampleUsers(int sampleIndex) const;
8485
void retargetSampleUsers(
8586
const etl::vector<SampleInstrument *, MAX_INSTRUMENT_COUNT> &users,
8687
uint16_t newIndex);
88+
#endif
8789
void loadSample(const etl::string<MAX_INSTRUMENT_FILENAME_LENGTH> path,
8890
bool isProjectSampleFile);
8991
bool reloadEditedSample();

0 commit comments

Comments
 (0)