Cleanups
This commit is contained in:
parent
dc68054981
commit
acb860e984
3 changed files with 4 additions and 16 deletions
|
|
@ -170,10 +170,7 @@ bool sfz::Region::parseOpcode(const Opcode& rawOpcode)
|
|||
group = opcode.read(Default::group);
|
||||
break;
|
||||
case hash("off_by"): // also offby
|
||||
if (opcode.value == "-1")
|
||||
offBy.reset();
|
||||
else
|
||||
offBy = opcode.read(Default::group);
|
||||
offBy = opcode.readOptional(Default::group);
|
||||
break;
|
||||
case hash("off_mode"): // also offmode
|
||||
offMode = opcode.read(Default::offMode);
|
||||
|
|
@ -189,16 +186,7 @@ bool sfz::Region::parseOpcode(const Opcode& rawOpcode)
|
|||
notePolyphony = opcode.read(Default::notePolyphony);
|
||||
break;
|
||||
case hash("note_selfmask"):
|
||||
switch (hash(opcode.value)) {
|
||||
case hash("on"):
|
||||
selfMask = SelfMask::mask;
|
||||
break;
|
||||
case hash("off"):
|
||||
selfMask = SelfMask::dontMask;
|
||||
break;
|
||||
default:
|
||||
DBG("Unkown self mask value:" << opcode.value);
|
||||
}
|
||||
selfMask = opcode.read(Default::selfMask);
|
||||
break;
|
||||
case hash("rt_dead"):
|
||||
rtDead = opcode.read(Default::rtDead);
|
||||
|
|
|
|||
|
|
@ -474,7 +474,7 @@ struct Region {
|
|||
bool bpmSwitched { true };
|
||||
bool aftertouchSwitched { true };
|
||||
std::bitset<config::numCCs> ccSwitched;
|
||||
absl::string_view defaultPath { "" };
|
||||
std::string defaultPath { "" };
|
||||
|
||||
int sequenceCounter { 0 };
|
||||
LEAK_DETECTOR(Region);
|
||||
|
|
|
|||
|
|
@ -2291,7 +2291,7 @@ TEST_CASE("[Values] Self-mask")
|
|||
"/region0/note_selfmask,T : { }",
|
||||
"/region1/note_selfmask,F : { }",
|
||||
"/region2/note_selfmask,T : { }",
|
||||
"/region3/note_selfmask,F : { }",
|
||||
"/region3/note_selfmask,T : { }",
|
||||
};
|
||||
REQUIRE(messageList == expected);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue