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/internal/catch_test_case_registry_impl.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/internal/catch_test_case_registry_impl.cpp')
| -rw-r--r-- | src/catch2/internal/catch_test_case_registry_impl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/catch2/internal/catch_test_case_registry_impl.cpp b/src/catch2/internal/catch_test_case_registry_impl.cpp index 6ce7a1ad..318156c4 100644 --- a/src/catch2/internal/catch_test_case_registry_impl.cpp +++ b/src/catch2/internal/catch_test_case_registry_impl.cpp @@ -14,6 +14,7 @@ #include <catch2/internal/catch_run_context.hpp> #include <catch2/catch_test_case_info.hpp> #include <catch2/catch_test_spec.hpp> +#include <catch2/internal/catch_move_and_forward.hpp> #include <algorithm> #include <set> @@ -119,8 +120,8 @@ namespace { void TestRegistry::registerTest(Detail::unique_ptr<TestCaseInfo> testInfo, Detail::unique_ptr<ITestInvoker> testInvoker) { m_handles.emplace_back(testInfo.get(), testInvoker.get()); m_viewed_test_infos.push_back(testInfo.get()); - m_owned_test_infos.push_back(std::move(testInfo)); - m_invokers.push_back(std::move(testInvoker)); + m_owned_test_infos.push_back(CATCH_MOVE(testInfo)); + m_invokers.push_back(CATCH_MOVE(testInvoker)); } std::vector<TestCaseInfo*> const& TestRegistry::getAllInfos() const { |