diff options
| author | Martin Hořeňovský | 2022-04-12 20:59:01 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-04-13 14:59:39 +0200 |
| commit | 4f09f1120ba0a28f218a00821a8347a443042ecb (patch) | |
| tree | af5dc04a3e0c91476e0b03e60d914d5bf2b11693 /src/catch2/internal/catch_console_colour.cpp | |
| parent | 9934b7de13ef303e0d7b1bccf519422be73c6a03 (diff) | |
| download | catch3-4f09f1120ba0a28f218a00821a8347a443042ecb.tar.gz | |
Make IStream::stream non-const
This way it makes much more sense from logically-const point
of view, and also means that concrete implementations don't
have to always have a `mutable` keyword on the stream member.
Diffstat (limited to 'src/catch2/internal/catch_console_colour.cpp')
| -rw-r--r-- | src/catch2/internal/catch_console_colour.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/catch2/internal/catch_console_colour.cpp b/src/catch2/internal/catch_console_colour.cpp index 67f0d98a..e9fa55f7 100644 --- a/src/catch2/internal/catch_console_colour.cpp +++ b/src/catch2/internal/catch_console_colour.cpp @@ -84,7 +84,7 @@ namespace Catch { //! platforms, and when the user asks to deactivate all colours. class NoColourImpl : public ColourImpl { public: - NoColourImpl( IStream const* stream ): ColourImpl( stream ) {} + NoColourImpl( IStream* stream ): ColourImpl( stream ) {} static bool useColourOnPlatform() { return true; } private: @@ -103,7 +103,7 @@ namespace { class Win32ColourImpl : public ColourImpl { public: - Win32ColourImpl(IStream const* stream): + Win32ColourImpl(IStream* stream): ColourImpl(stream) { CONSOLE_SCREEN_BUFFER_INFO csbiInfo; GetConsoleScreenBufferInfo( GetStdHandle( STD_OUTPUT_HANDLE ), @@ -169,7 +169,7 @@ namespace { class ANSIColourImpl : public ColourImpl { public: - ANSIColourImpl( IStream const* stream ): ColourImpl( stream ) {} + ANSIColourImpl( IStream* stream ): ColourImpl( stream ) {} static bool useColourOnPlatform(IStream const& stream) { // This is kinda messy due to trying to support a bunch of @@ -229,7 +229,7 @@ namespace { namespace Catch { Detail::unique_ptr<ColourImpl> makeColourImpl( ColourMode implSelection, - IStream const* stream ) { + IStream* stream ) { if ( implSelection == ColourMode::None ) { return Detail::make_unique<NoColourImpl>( stream ); } |