Skip to content

"noexcept" not explained - suggestion #4

@gfazzito

Description

@gfazzito

Just a suggestion. On page 107 in the pdf (chapter 8: Plug-in parameters), at the top it has the following code:

Change the code in Parameters.h to the following:

#pragma once
#include <JuceHeader.h>

class Parameters
{
public:
   Parameters(juce::AudioProcessorValueTreeState& apvts); 
   static juce::AudioProcessorValueTreeState::ParameterLayout
   createParameterLayout();
// 1
   void update() noexcept;
// 2
   float gain;
// 3
private:
   juce::AudioParameterFloat* gainParam;
}

The explanation of the line n° 1 says:

"1. You added a new function, update(). This where we’ll read the current OutputGain parameter setting and put it into the gain variable."

But it doesn't explain what noexepct is. Maybe adding some text to explain it could be helpful for clearing out any doubts.
For example:

" In C++, the "noexcept" specifier is used to indicate that a function does not throw any exceptions. This specifier can be applied to functions, variables, and pointers or references to functions. Don't worry about this for now as it will be explained more in detail later..."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions