Cleanup some stuff found by MSVC's /analyze

* Added some missing `noexcept`s on custom destructors.
* Fixed `std::move` being called on a const-reference.
* Initialized `ScopedMessage::m_moved` in class definition, instead
of doing so in constructors explicitly.
* Turned some `enum`s into `enum class`es.
* Initialized `StreamingReporterBase::currentTestCaseInfo` in class
definition.
* Some cleanups in SelfTest code.
This commit is contained in:
Martin Hořeňovský
2020-08-19 17:44:22 +02:00
parent 2e480b6e56
commit 1a97af45f1
8 changed files with 27 additions and 27 deletions

View File

@@ -104,10 +104,10 @@ namespace {
move_detector(move_detector const& rhs) = default;
move_detector& operator=(move_detector const& rhs) = default;
move_detector(move_detector&& rhs) {
move_detector(move_detector&& rhs) noexcept {
rhs.has_moved = true;
}
move_detector& operator=(move_detector&& rhs) {
move_detector& operator=(move_detector&& rhs) noexcept {
rhs.has_moved = true;
return *this;
}