STYLE: remove virtual from override-qualified methods (surfaceFeatureExtract)

This commit is contained in:
Mark Olesen
2023-10-23 09:44:54 +02:00
parent 32a8a30b8c
commit e4745d09ec
8 changed files with 21 additions and 61 deletions

View File

@ -63,15 +63,8 @@ Foam::surfaceFeaturesExtraction::extractFromFile::extractFromFile
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::surfaceFeaturesExtraction::extractFromFile::~extractFromFile()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::surfaceFeatures> Foam::autoPtr<Foam::surfaceFeatures>
Foam::surfaceFeaturesExtraction::extractFromFile::features Foam::surfaceFeaturesExtraction::extractFromFile::features
( (

View File

@ -67,14 +67,10 @@ public:
extractFromFile(const dictionary& dict); extractFromFile(const dictionary& dict);
//- Destructor //- Destructor
virtual ~extractFromFile(); virtual ~extractFromFile() = default;
//- Features loaded (extracted) from featureEdgeFile //- Features loaded (extracted) from featureEdgeFile
virtual autoPtr<surfaceFeatures> features autoPtr<surfaceFeatures> features(const triSurface& surf) const override;
(
const triSurface& surf
) const override;
}; };

View File

@ -61,12 +61,6 @@ Foam::surfaceFeaturesExtraction::extractFromNone::extractFromNone
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::surfaceFeaturesExtraction::extractFromNone::~extractFromNone()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::surfaceFeatures> Foam::autoPtr<Foam::surfaceFeatures>

View File

@ -58,22 +58,16 @@ class extractFromNone
: :
public method public method
{ {
public: public:
//- Construct from dictionary //- Construct from dictionary
extractFromNone(const dictionary& dict); explicit extractFromNone(const dictionary& dict);
//- Destructor //- Destructor
virtual ~extractFromNone(); virtual ~extractFromNone() = default;
//- Extracted features from surface (no-op) //- Extracted features from surface (no-op)
virtual autoPtr<surfaceFeatures> features autoPtr<surfaceFeatures> features(const triSurface& surf) const override;
(
const triSurface& surf
) const override;
}; };

View File

@ -62,15 +62,8 @@ Foam::surfaceFeaturesExtraction::extractFromSurface::extractFromSurface
} }
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * //
Foam::surfaceFeaturesExtraction::extractFromSurface::~extractFromSurface()
{}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //
Foam::autoPtr<Foam::surfaceFeatures> Foam::autoPtr<Foam::surfaceFeatures>
Foam::surfaceFeaturesExtraction::extractFromSurface::features Foam::surfaceFeaturesExtraction::extractFromSurface::features
( (

View File

@ -65,14 +65,10 @@ public:
extractFromSurface(const dictionary& dict); extractFromSurface(const dictionary& dict);
//- Destructor //- Destructor
virtual ~extractFromSurface(); virtual ~extractFromSurface() = default;
//- Features extracted from surface //- Features extracted from surface
virtual autoPtr<surfaceFeatures> features autoPtr<surfaceFeatures> features(const triSurface& surf) const override;
(
const triSurface& surf
) const override;
}; };

View File

@ -56,10 +56,14 @@ Foam::surfaceFeaturesExtraction::method::method()
{} {}
// * * * * * * * * * * * * * * * * Destructor * * * * * * * * * * * * * * * // Foam::surfaceFeaturesExtraction::method::method(const dictionary& dict)
:
Foam::surfaceFeaturesExtraction::method::~method() includedAngle_(0),
{} geometricTestOnly_(Switch::NO)
{
dict.readIfPresent("includedAngle", includedAngle_);
dict.readIfPresent("geometricTestOnly", geometricTestOnly_);
}
// * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * // // * * * * * * * * * * * * * * * Member Functions * * * * * * * * * * * * * //

View File

@ -66,7 +66,7 @@ protected:
scalar includedAngle_; scalar includedAngle_;
Switch geometricTestOnly_; Switch geometricTestOnly_;
//- Construct null //- Default construct
method(); method();
@ -79,7 +79,7 @@ public:
// Constructors // Constructors
//- Construct from dictionary //- Construct from dictionary
method(const dictionary& dict); explicit method(const dictionary& dict);
// Declare run-time constructor selection table // Declare run-time constructor selection table
@ -98,36 +98,26 @@ public:
// Selectors // Selectors
//- Select constructed from dictionary //- Select constructed from dictionary
static autoPtr<method> New static autoPtr<method> New(const dictionary& dict);
(
const dictionary& dict
);
//- Destructor //- Destructor
virtual ~method(); virtual ~method() = default;
// Member Functions // Member Functions
//- The included angle, if set //- The included angle, if set
inline scalar includedAngle() const scalar includedAngle() const noexcept { return includedAngle_; }
{
return includedAngle_;
}
//- Use geometric test only //- Use geometric test only
inline Switch geometricTestOnly() const Switch geometricTestOnly() const noexcept { return geometricTestOnly_; }
{
return geometricTestOnly_;
}
//- Extracted features //- Extracted features
virtual autoPtr<surfaceFeatures> features virtual autoPtr<surfaceFeatures> features
( (
const triSurface& surf const triSurface& surf
) const = 0; ) const = 0;
}; };