Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/catch_session.cpp
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-08-13 14:16:30 +0200
committerMartin Hořeňovský2021-08-16 16:22:19 +0200
commitd2ee7100d26128b3956571cc802f3a52c9b9aea8 (patch)
tree84845c4a6bbc080c40cdd37ca373b1832aa84159 /src/catch2/catch_session.cpp
parent03ce304102829d438a0e3249b86094a6da802dfa (diff)
downloadcatch3-d2ee7100d26128b3956571cc802f3a52c9b9aea8.tar.gz
Replace uses of std::move and std::forward with macros
This improves the SelfTest build times by about 3% (measured with Clang 10 on random Linux box I had lying around).
Diffstat (limited to 'src/catch2/catch_session.cpp')
-rw-r--r--src/catch2/catch_session.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/catch2/catch_session.cpp b/src/catch2/catch_session.cpp
index 4419da4c..6ce21803 100644
--- a/src/catch2/catch_session.cpp
+++ b/src/catch2/catch_session.cpp
@@ -21,6 +21,7 @@
#include <catch2/reporters/catch_reporter_listening.hpp>
#include <catch2/interfaces/catch_interfaces_reporter_registry.hpp>
#include <catch2/interfaces/catch_interfaces_reporter_factory.hpp>
+#include <catch2/internal/catch_move_and_forward.hpp>
#include <algorithm>
#include <iomanip>
@@ -57,7 +58,7 @@ namespace Catch {
explicit TestGroup(IStreamingReporterPtr&& reporter, Config const* config):
m_reporter(reporter.get()),
m_config{config},
- m_context{config, std::move(reporter)} {
+ m_context{config, CATCH_MOVE(reporter)} {
auto const& allTestCases = getAllTestCasesSorted(*m_config);
m_matches = m_config->testSpec().matchesByFilter(allTestCases, *m_config);
@@ -277,7 +278,7 @@ namespace Catch {
return 0;
}
- TestGroup tests { std::move(reporter), m_config.get() };
+ TestGroup tests { CATCH_MOVE(reporter), m_config.get() };
auto const totals = tests.execute();
if( m_config->warnAboutNoTests() && totals.error == -1 )