diff --git a/src/ur.cpp b/src/ur.cpp index 2227340..230d123 100644 --- a/src/ur.cpp +++ b/src/ur.cpp @@ -13,8 +13,8 @@ using namespace std; namespace ur { -UR::UR(const std::string &type, const ByteVector &cbor) - : type_(type), cbor_(cbor) +UR::UR(std::string type, ByteVector cbor) + : type_(std::move(type)), cbor_(std::move(cbor)) { if (!is_ur_type(type)) { throw invalid_type(); diff --git a/src/ur.hpp b/src/ur.hpp index 6cf2fbf..6a40f40 100644 --- a/src/ur.hpp +++ b/src/ur.hpp @@ -24,7 +24,7 @@ class UR { const std::string& type() const { return type_; } const ByteVector& cbor() const { return cbor_; } - UR(const std::string& type, const ByteVector& cbor); + UR(std::string type, ByteVector cbor); }; bool operator==(const UR& lhs, const UR& rhs);