Skip to content

Commit b741aa8

Browse files
Enkerliclaude
andcommitted
Clean up unused variables causing compiler warnings
FIXED COMPILER WARNINGS: - PluginProcessor.cpp:429 - Removed unused samplesPerStep variable - PluginProcessor.cpp:424 - Removed unused stepFraction variable - PluginProcessor.cpp:1124/1125 - Inlined onsets/steps variables used only in DBG - PluginEditor.cpp:357 - Removed unused titleArea variable - PluginEditor.cpp:514 - Removed unused testStepCounter variable - PluginEditor.cpp:635 - Removed unused endAngle variable OPTIMIZATION: - Variables that were calculated but never used have been eliminated - DBG-only variables inlined to remove production overhead - Cleaner code with no compiler warnings All functionality preserved while improving code quality. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ffaf2c0 commit b741aa8

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

Plugin/Source/PluginEditor.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ void RhythmPatternExplorerAudioProcessorEditor::resized()
354354
// NORMAL MODE: Full UI layout
355355

356356
// Title area
357-
auto titleArea = area.removeFromTop(50);
357+
area.removeFromTop(50);
358358

359359
// Control area - compact layout with UPI input and controls
360360
auto controlArea = area.removeFromTop(70);
@@ -511,7 +511,6 @@ void RhythmPatternExplorerAudioProcessorEditor::timerCallback()
511511
static int lastCurrentStep = -1;
512512
static bool lastPlayingState = false;
513513
static int frameCount = 0;
514-
static int testStepCounter = 0;
515514

516515
frameCount++;
517516

@@ -632,7 +631,6 @@ void RhythmPatternExplorerAudioProcessorEditor::drawPatternCircle(juce::Graphics
632631
float sliceAngle = 2.0f * juce::MathConstants<float>::pi / numSteps;
633632
// Start at 12 o'clock (north) and center slice 0 there: offset by half slice angle
634633
float startAngle = (i * sliceAngle) - juce::MathConstants<float>::halfPi - (sliceAngle * 0.5f);
635-
float endAngle = startAngle + sliceAngle;
636634

637635
// Only draw onset slices
638636
if (pattern[i])

Plugin/Source/PluginProcessor.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,8 @@ void RhythmPatternExplorerAudioProcessor::processBlock (juce::AudioBuffer<float>
420420
int targetStep = static_cast<int>(stepsInCurrentCycle);
421421

422422

423-
// Calculate the exact fractional position within the current step
424-
double stepFraction = stepsFromStart - std::floor(stepsFromStart);
425-
426423
// Trigger notes at the exact moment they should occur
427424
int numSamples = buffer.getNumSamples();
428-
double samplesPerBeat = getSampleRate() * 60.0 / posInfo.bpm;
429-
double samplesPerStep = samplesPerBeat * beatsPerStep;
430425

431426
// Track the last processed step to detect boundaries
432427
static int lastProcessedStep = -1;
@@ -1121,10 +1116,7 @@ void RhythmPatternExplorerAudioProcessor::parseAndApplyUPI(const juce::String& u
11211116
}
11221117

11231118
// Update parameters to reflect the new pattern
1124-
int onsets = UPIParser::countOnsets(parseResult.pattern);
1125-
int steps = static_cast<int>(parseResult.pattern.size());
1126-
1127-
DBG(" Onsets: " + juce::String(onsets) + ", Steps: " + juce::String(steps));
1119+
DBG(" Onsets: " + juce::String(UPIParser::countOnsets(parseResult.pattern)) + ", Steps: " + juce::String(parseResult.pattern.size()));
11281120

11291121
// Pattern applied successfully via UPI
11301122

0 commit comments

Comments
 (0)