[clang-tidy] Pass by value with std::move

Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev 2019-09-27 20:04:17 -07:00 committed by Paul Beckingham
parent 6cd15235be
commit e46039efb1
2 changed files with 4 additions and 3 deletions

View file

@ -27,6 +27,7 @@
#include <cmake.h>
#include <sstream>
#include <algorithm>
#include <utility>
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
@ -127,9 +128,9 @@ Variant::Variant (const double value)
}
////////////////////////////////////////////////////////////////////////////////
Variant::Variant (const std::string& value)
Variant::Variant (std::string value)
: _type (Variant::type_string)
, _string (value)
, _string (std::move(value))
{
}

View file

@ -47,7 +47,7 @@ public:
Variant (const bool);
Variant (const int);
Variant (const double);
Variant (const std::string&);
Variant (std::string );
Variant (const char*);
Variant (const time_t, const enum type);