From c9e6cec9f909db85df80688c7a5b2a0c97e56c3f Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Wed, 2 Jan 2019 11:56:56 +0100 Subject: run clang tidy modernize pass --- testfiles/src/attributes-test.cpp | 5 +++-- testfiles/src/style-test.cpp | 17 +++++++++-------- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'testfiles') diff --git a/testfiles/src/attributes-test.cpp b/testfiles/src/attributes-test.cpp index ae933611d..ce397b9bb 100644 --- a/testfiles/src/attributes-test.cpp +++ b/testfiles/src/attributes-test.cpp @@ -12,6 +12,7 @@ */ #include +#include #include #include "gtest/gtest.h" @@ -25,8 +26,8 @@ static const unsigned int FIRST_VALID_ID = 1; class AttributeInfo { public: - AttributeInfo(std::string const &attr, bool supported) : - attr(attr), + AttributeInfo(std::string attr, bool supported) : + attr(std::move(attr)), supported(supported) { } diff --git a/testfiles/src/style-test.cpp b/testfiles/src/style-test.cpp index 1d34e7bef..15195d853 100644 --- a/testfiles/src/style-test.cpp +++ b/testfiles/src/style-test.cpp @@ -12,6 +12,7 @@ */ #include +#include #include #include "gtest/gtest.h" @@ -23,13 +24,13 @@ namespace { class StyleRead { public: - StyleRead(std::string const &src, std::string const &dst, std::string const &uri) : - src(src), dst(dst), uri(uri) + StyleRead(std::string src, std::string dst, std::string uri) : + src(std::move(src)), dst(std::move(dst)), uri(std::move(uri)) { } - StyleRead(std::string const &src, std::string const &dst) : - src(src), dst(dst), uri("") + StyleRead(std::string src, std::string dst) : + src(std::move(src)), dst(std::move(dst)), uri("") { } @@ -275,8 +276,8 @@ TEST(StyleTest, Read) { class StyleMatch { public: - StyleMatch(std::string const &src, std::string const &dst, bool const &match) : - src(src), dst(dst), match(match) + StyleMatch(std::string src, std::string dst, bool const &match) : + src(std::move(src)), dst(std::move(dst)), match(match) { } @@ -426,8 +427,8 @@ TEST(StyleTest, Match) { class StyleCascade { public: - StyleCascade(std::string const &parent, std::string const &child, std::string const &result) : - parent(parent), child(child), result(result) + StyleCascade(std::string parent, std::string child, std::string result) : + parent(std::move(parent)), child(std::move(child)), result(std::move(result)) { } -- cgit v1.2.3