diff options
| author | offa | 2020-01-21 21:04:42 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2020-02-16 15:25:23 +0100 |
| commit | 06c32862b3d7d20544ba876e590e799667b3afa8 (patch) | |
| tree | 3f15b5a7abc220c562c353f128c989ba312f782f /src/catch2/catch_console_colour.cpp | |
| parent | ab520f4e97ad5e9b01c0f08cda868d9690d35aff (diff) | |
| download | catch3-06c32862b3d7d20544ba876e590e799667b3afa8.tar.gz | |
Some refactorings:
- Overrides added
- usages of push_back() replaced with emplace_back()
- Loop variable made const-refernce
- NULL replaced with nullptr
- Names used in the declaration and definition unified
- size() replaced with empty
- Identical cases merged
Diffstat (limited to 'src/catch2/catch_console_colour.cpp')
| -rw-r--r-- | src/catch2/catch_console_colour.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/catch2/catch_console_colour.cpp b/src/catch2/catch_console_colour.cpp index 6a9bcc38..07b150cb 100644 --- a/src/catch2/catch_console_colour.cpp +++ b/src/catch2/catch_console_colour.cpp @@ -34,7 +34,7 @@ namespace Catch { }; struct NoColourImpl : IColourImpl { - void use( Colour::Code ) {} + void use( Colour::Code ) override {} static IColourImpl* instance() { static NoColourImpl s_instance; @@ -208,13 +208,13 @@ namespace Catch { namespace Catch { Colour::Colour( Code _colourCode ) { use( _colourCode ); } - Colour::Colour( Colour&& rhs ) noexcept { - m_moved = rhs.m_moved; - rhs.m_moved = true; + Colour::Colour( Colour&& other ) noexcept { + m_moved = other.m_moved; + other.m_moved = true; } - Colour& Colour::operator=( Colour&& rhs ) noexcept { - m_moved = rhs.m_moved; - rhs.m_moved = true; + Colour& Colour::operator=( Colour&& other ) noexcept { + m_moved = other.m_moved; + other.m_moved = true; return *this; } @@ -226,7 +226,7 @@ namespace Catch { // However, under some conditions it does happen (see #1626), // and this change is small enough that we can let practicality // triumph over purity in this case. - if (impl != NULL) { + if (impl != nullptr) { impl->use( _colourCode ); } } |