Browse files

Syntax of DspClip is compacted. Easier to read.

  • Loading branch information...
1 parent 3e851a7 commit 489a7b9289e2eea6ae7f230119576b698847275d @mhroth committed Sep 9, 2011
Showing with 6 additions and 27 deletions.
  1. +6 −27 src/DspClip.cpp
View
33 src/DspClip.cpp
@@ -64,38 +64,17 @@ void DspClip::onInletConnectionUpdate() {
void DspClip::processMessage(int inletIndex, PdMessage *message) {
switch (inletIndex) {
- case 1: {
- if (message->isFloat(0)) {
- lowerBound = message->getFloat(0); // set the lower bound
- }
- break;
- }
- case 2: {
- if (message->isFloat(0)) {
- upperBound = message->getFloat(0); // set the upper bound
- }
- break;
- }
- default: {
- break;
- }
+ case 1: if (message->isFloat(0)) lowerBound = message->getFloat(0); break; // set the lower bound
+ case 2: if (message->isFloat(0)) upperBound = message->getFloat(0); break; // set the upper bound
+ default: break;
}
}
void DspClip::processDsp() {
switch (codePath) {
- case DSP_CLIP_DSPX_MESSAGE0: {
- resolveInputBuffers(0, dspBufferAtInlet0);
- // allow fallthrough
- }
- case DSP_CLIP_DSP1_MESSAGE0: {
- processDspWithIndex(0, blockSizeInt);
- break;
- }
- default: {
- DspObject::processDsp();
- break;
- }
+ case DSP_CLIP_DSPX_MESSAGE0: resolveInputBuffers(0, dspBufferAtInlet0); // allow fallthrough
+ case DSP_CLIP_DSP1_MESSAGE0: processDspWithIndex(0, blockSizeInt); break;
+ default: DspObject::processDsp(); break;
}
}

0 comments on commit 489a7b9

Please sign in to comment.