Skip to content

Commit 7be29c2

Browse files
committed
Try to fix pageLabels initialisation
1 parent 303de3b commit 7be29c2

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

src/OrestesOne.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ struct E1MidiOutput : OrestesOneOutput {
9595
/**
9696
* Inform E1 that a change module action is starting
9797
*/
98-
void changeE1Module(const std::string moduleDisplayName, float moduleY, float moduleX, int maxNprnId, std::array<std::string, MAX_PAGES> pageLabels) {
98+
void changeE1Module(const std::string moduleDisplayName, float moduleY, float moduleX, int maxNprnId, const std::array<std::string, MAX_PAGES>& pageLabels) {
9999
// Truncate module name to keep string length less than 128 characters
100100
auto raw = string::f("changeE1Module(\"%s\", %g, %g, %d)", moduleDisplayName.substr(0, 50).c_str(), moduleY, moduleX, maxNprnId);
101101
stripUnicode(raw);
@@ -442,7 +442,7 @@ struct OrestesOneModule : Module {
442442
dsp::ClockDivider indicatorDivider;
443443

444444
/** [Stored to Json] */
445-
std::array<std::string, MAX_PAGES> pageLabels{"", "", "", "", "", ""}; // Current mapped module control page labels
445+
std::array<std::string, MAX_PAGES> pageLabels = {"", "", "", "", "", ""}; // Current mapped module control page labels
446446

447447
// MEM-
448448
// Pointer of the MEM's attribute
@@ -1136,7 +1136,7 @@ struct OrestesOneModule : Module {
11361136
}
11371137
}
11381138

1139-
void changeE1Module(const std::string moduleName, float moduleY, float moduleX, int maxNprnId, std::array<std::string, MAX_PAGES> pageLabels) {
1139+
void changeE1Module(const std::string moduleName, float moduleY, float moduleX, int maxNprnId, const std::array<std::string, MAX_PAGES>& pageLabels) {
11401140
// DEBUG("changeE1Module to %s", moduleName);
11411141
midiCtrlOutput.changeE1Module(moduleName, moduleY, moduleX, maxNprnId, pageLabels);
11421142
}

src/Pylades.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ struct OscOutput {
5959
/**
6060
* Inform TouchOSC that a change module action is starting
6161
*/
62-
void changeOSCModule(const char* moduleName, const char* moduleDisplayName, float moduleY, float moduleX, int maxNprnId, std::array<std::string, MAX_PAGES> pageLabels) {
62+
void changeOSCModule(const char* moduleName, const char* moduleDisplayName, float moduleY, float moduleX, int maxNprnId, const std::array<std::string, MAX_PAGES>& pageLabels) {
6363

6464
if (moduleRef.sending) {
6565
TheModularMind::OscBundle feedbackBundle;
@@ -394,7 +394,7 @@ struct OscOutput {
394394
dsp::ClockDivider lightDivider;
395395

396396
/** [Stored to Json] */
397-
std::array<std::string, MAX_PAGES> pageLabels{"", "", "", "", "", ""}; // Current mapped module control page labels
397+
std::array<std::string, MAX_PAGES> pageLabels = {"", "", "", "", "", ""}; // Current mapped module control page labels
398398

399399
// MEM-
400400
// Pointer of the MEM's attribute
@@ -1002,7 +1002,7 @@ struct OscOutput {
10021002
}
10031003
}
10041004

1005-
void changeOSCModule(const char* moduleName, const char* moduleDisplayName, float moduleY, float moduleX, int maxNprnId, std::array<std::string, MAX_PAGES> pageLabels) {
1005+
void changeOSCModule(const char* moduleName, const char* moduleDisplayName, float moduleY, float moduleX, int maxNprnId, const std::array<std::string, MAX_PAGES>& pageLabels) {
10061006
// DEBUG("changeOSCModule to %s", moduleName);
10071007
oscOutput.changeOSCModule(moduleName, moduleDisplayName, moduleY, moduleX, maxNprnId, pageLabels);
10081008
}

src/RSBATechModules.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
#pragma once
22
#include "plugin.hpp"
33
#include "digital/ScaledMapParam.hpp"
4+
#include <array>
45

56
namespace RSBATechModules {
67

@@ -46,7 +47,7 @@ struct MemModule {
4647
std::string moduleName;
4748
bool autoMapped;
4849
std::list<MemParam*> paramMap;
49-
std::array<std::string, MAX_PAGES> pageLabels{"", "", "", "", "", ""};
50+
std::array<std::string, MAX_PAGES> pageLabels = {"", "", "", "", "", ""};
5051
~MemModule() {
5152
for (auto it : paramMap) delete it;
5253
}

0 commit comments

Comments
 (0)