diff options
| author | Martin Hořeňovský | 2021-08-13 14:16:30 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-08-16 16:22:19 +0200 |
| commit | d2ee7100d26128b3956571cc802f3a52c9b9aea8 (patch) | |
| tree | 84845c4a6bbc080c40cdd37ca373b1832aa84159 /src/catch2/catch_registry_hub.cpp | |
| parent | 03ce304102829d438a0e3249b86094a6da802dfa (diff) | |
| download | catch3-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_registry_hub.cpp')
| -rw-r--r-- | src/catch2/catch_registry_hub.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/catch2/catch_registry_hub.cpp b/src/catch2/catch_registry_hub.cpp index c183600a..edf9b2b5 100644 --- a/src/catch2/catch_registry_hub.cpp +++ b/src/catch2/catch_registry_hub.cpp @@ -19,6 +19,7 @@ #include <catch2/catch_test_case_info.hpp> #include <catch2/internal/catch_noncopyable.hpp> #include <catch2/interfaces/catch_interfaces_reporter_factory.hpp> +#include <catch2/internal/catch_move_and_forward.hpp> namespace Catch { @@ -48,16 +49,16 @@ namespace Catch { public: // IMutableRegistryHub void registerReporter( std::string const& name, IReporterFactoryPtr factory ) override { - m_reporterRegistry.registerReporter( name, std::move(factory) ); + m_reporterRegistry.registerReporter( name, CATCH_MOVE(factory) ); } void registerListener( IReporterFactoryPtr factory ) override { - m_reporterRegistry.registerListener( std::move(factory) ); + m_reporterRegistry.registerListener( CATCH_MOVE(factory) ); } void registerTest( Detail::unique_ptr<TestCaseInfo>&& testInfo, Detail::unique_ptr<ITestInvoker>&& invoker ) override { - m_testCaseRegistry.registerTest( std::move(testInfo), std::move(invoker) ); + m_testCaseRegistry.registerTest( CATCH_MOVE(testInfo), CATCH_MOVE(invoker) ); } void registerTranslator( Detail::unique_ptr<IExceptionTranslator>&& translator ) override { - m_exceptionTranslatorRegistry.registerTranslator( std::move(translator) ); + m_exceptionTranslatorRegistry.registerTranslator( CATCH_MOVE(translator) ); } void registerTagAlias( std::string const& alias, std::string const& tag, SourceLineInfo const& lineInfo ) override { m_tagAliasRegistry.add( alias, tag, lineInfo ); |