[tidy] Check modernize-pass-by-value
Ref: http://clang.llvm.org/extra/clang-tidy/checks/modernize-pass-by-value.html
This commit is contained in:
@@ -6,8 +6,8 @@ namespace mbgl {
|
||||
FixtureLog::Message::Message(EventSeverity severity_,
|
||||
Event event_,
|
||||
int64_t code_,
|
||||
const std::string& msg_)
|
||||
: severity(severity_), event(event_), code(code_), msg(msg_) {
|
||||
std::string msg_)
|
||||
: severity(severity_), event(event_), code(code_), msg(std::move(msg_)) {
|
||||
}
|
||||
|
||||
bool FixtureLog::Message::operator==(const Message& rhs) const {
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace mbgl {
|
||||
class FixtureLog {
|
||||
public:
|
||||
struct Message {
|
||||
Message(EventSeverity severity_, Event event_, int64_t code_, const std::string &msg_);
|
||||
Message(EventSeverity severity_, Event event_, int64_t code_, std::string msg_);
|
||||
Message();
|
||||
|
||||
bool operator==(const Message& rhs) const;
|
||||
|
||||
@@ -16,8 +16,8 @@ typedef std::multimap<std::string, mbgl::Value> Properties;
|
||||
|
||||
class StubFeature : public GeometryTileFeature {
|
||||
public:
|
||||
inline StubFeature(const Properties& properties_, FeatureType type_)
|
||||
: properties(properties_)
|
||||
inline StubFeature(Properties properties_, FeatureType type_)
|
||||
: properties(std::move(properties_))
|
||||
, type(type_)
|
||||
{}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user