Xcode ~ScopedPointer' is deprecated issues

I’m, trying to create an distortion plugins a noob but i keep coming up with “~ScopedPointer’ is deprecated” in my code…

I’ve added it below! please help!

/*

This file was auto-generated!

It contains the basic framework code for a JUCE plugin editor.

==============================================================================
*/

#include “PluginProcessor.h”
#include “PluginEditor.h”

//==============================================================================
NsfrdistortionAudioProcessorEditor::NsfrdistortionAudioProcessorEditor (NsfrdistortionAudioProcessor& p)
: AudioProcessorEditor (&p), processor §
{

addAndMakeVisible(driveKnob = new Slider ("Drive"));
driveKnob->setSliderStyle(Slider::Rotary);
driveKnob->setTextBoxStyle(Slider::NoTextBox, false, 100, 100);

addAndMakeVisible(driveKnob = new Slider ("Range"));
rangeKnob->setSliderStyle(Slider::Rotary);
rangeKnob->setTextBoxStyle(Slider::NoTextBox, false, 100, 100);

addAndMakeVisible(driveKnob = new Slider ("Blend"));
blendKnob->setSliderStyle(Slider::Rotary);
blendKnob->setTextBoxStyle(Slider::NoTextBox, false, 100, 100);

addAndMakeVisible(driveKnob = new Slider ("Volume"));
volumeKnob->setSliderStyle(Slider::Rotary);
volumeKnob->setTextBoxStyle(Slider::NoTextBox, false, 100, 100);

driveAttachment = new AudioProcessorValueTreeState::SliderAttachment(p.getState(), "drive", *driveKnob);
rangeAttachment = new AudioProcessorValueTreeState::SliderAttachment(p.getState(), "range", *rangeKnob);
blendAttachment = new AudioProcessorValueTreeState::SliderAttachment(p.getState(), "blend", *rangeKnob);
volumeAttachment = new AudioProcessorValueTreeState::SliderAttachment(p.getState(), "volume", *volumeKnob);

// Make sure that before the constructor has finished, you've set the
// editor's size to whatever you need it to be.
setSize (500, 200);

}

NsfrdistortionAudioProcessorEditor::~NsfrdistortionAudioProcessorEditor()
{
}

//==============================================================================
void NsfrdistortionAudioProcessorEditor::paint (Graphics& g)
{
// (Our component is opaque, so we must completely fill the background with a solid colour)
g.fillAll (getLookAndFeel().findColour (ResizableWindow::backgroundColourId));

g.setColour (Colours::white);
g.setFont (15.0f);
g.drawFittedText ("Hello World!", getLocalBounds(), Justification::centred, 1);

}

void NsfrdistortionAudioProcessorEditor::resized()
{
// This is generally where you’ll want to lay out the positions of any
// subcomponents in your editor…

driveKnob->setBounds(((getWidth() / 5) * 1) - (100 /2), (getHeight() / 2) - (100 / 2), 100, 100);
rangeKnob->setBounds(((getWidth() / 5) * 2) - (100 /2), (getHeight() / 2) - (100 / 2), 100, 100);
blendKnob->setBounds(((getWidth() / 5) * 3) - (100 /2), (getHeight() / 2) - (100 / 2), 100, 100);
volumeKnob->setBounds(((getWidth() / 5) * 4) - (100 /2), (getHeight() / 2) - (100 / 2), 100, 100);

}

Solved!

For future reference, to display your code without being messed up by forum formatting, you should do one of the following:

  • select all of your code while editing and press the tool button that has this symbol on it “</>”
  • make sure that every line of your code starts with at least 4 spaces
  • put three consecutive backticks ` before your code starts, and three more at the end of it, to close the “code” section

awesome thanks!

Hi can you share how you fixed the scopedpointer deprecated?