mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 05:16:10 +01:00
Mark various anonymous classes final
This commit is contained in:
parent
173aa3f1f4
commit
2598116aa6
@ -85,7 +85,7 @@ namespace Catch {
|
||||
namespace {
|
||||
//! A do-nothing implementation of colour, used as fallback for unknown
|
||||
//! platforms, and when the user asks to deactivate all colours.
|
||||
class NoColourImpl : public ColourImpl {
|
||||
class NoColourImpl final : public ColourImpl {
|
||||
public:
|
||||
NoColourImpl( IStream* stream ): ColourImpl( stream ) {}
|
||||
|
||||
@ -103,7 +103,7 @@ namespace Catch {
|
||||
namespace Catch {
|
||||
namespace {
|
||||
|
||||
class Win32ColourImpl : public ColourImpl {
|
||||
class Win32ColourImpl final : public ColourImpl {
|
||||
public:
|
||||
Win32ColourImpl(IStream* stream):
|
||||
ColourImpl(stream) {
|
||||
@ -169,7 +169,7 @@ namespace {
|
||||
namespace Catch {
|
||||
namespace {
|
||||
|
||||
class ANSIColourImpl : public ColourImpl {
|
||||
class ANSIColourImpl final : public ColourImpl {
|
||||
public:
|
||||
ANSIColourImpl( IStream* stream ): ColourImpl( stream ) {}
|
||||
|
||||
|
@ -24,7 +24,7 @@ namespace Catch {
|
||||
namespace Detail {
|
||||
namespace {
|
||||
template<typename WriterF, std::size_t bufferSize=256>
|
||||
class StreamBufImpl : public std::streambuf {
|
||||
class StreamBufImpl final : public std::streambuf {
|
||||
char data[bufferSize];
|
||||
WriterF m_writer;
|
||||
|
||||
@ -72,7 +72,7 @@ namespace Detail {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class FileStream : public IStream {
|
||||
class FileStream final : public IStream {
|
||||
std::ofstream m_ofs;
|
||||
public:
|
||||
FileStream( std::string const& filename ) {
|
||||
@ -89,7 +89,7 @@ namespace Detail {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class CoutStream : public IStream {
|
||||
class CoutStream final : public IStream {
|
||||
std::ostream m_os;
|
||||
public:
|
||||
// Store the streambuf from cout up-front because
|
||||
@ -118,7 +118,7 @@ namespace Detail {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class DebugOutStream : public IStream {
|
||||
class DebugOutStream final : public IStream {
|
||||
Detail::unique_ptr<StreamBufImpl<OutputDebugWriter>> m_streamBuf;
|
||||
std::ostream m_os;
|
||||
public:
|
||||
|
@ -27,7 +27,7 @@ namespace Catch {
|
||||
|
||||
namespace Generators {
|
||||
namespace {
|
||||
struct GeneratorTracker : TestCaseTracking::TrackerBase,
|
||||
struct GeneratorTracker final : TestCaseTracking::TrackerBase,
|
||||
IGeneratorTracker {
|
||||
GeneratorBasePtr m_generator;
|
||||
|
||||
@ -36,7 +36,7 @@ namespace Catch {
|
||||
TrackerContext& ctx,
|
||||
ITracker* parent ):
|
||||
TrackerBase( CATCH_MOVE( nameAndLocation ), ctx, parent ) {}
|
||||
~GeneratorTracker() override;
|
||||
~GeneratorTracker() override = default;
|
||||
|
||||
static GeneratorTracker*
|
||||
acquire( TrackerContext& ctx,
|
||||
@ -161,7 +161,6 @@ namespace Catch {
|
||||
m_generator = CATCH_MOVE( generator );
|
||||
}
|
||||
};
|
||||
GeneratorTracker::~GeneratorTracker() = default;
|
||||
} // namespace
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@ namespace Catch {
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
class RunContext : public IResultCapture {
|
||||
class RunContext final : public IResultCapture {
|
||||
|
||||
public:
|
||||
RunContext( RunContext const& ) = delete;
|
||||
|
Loading…
Reference in New Issue
Block a user