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 * * * * * * * * * * * * * //
Foam::autoPtr<Foam::surfaceFeatures>
Foam::surfaceFeaturesExtraction::extractFromFile::features
(

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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