We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1b2078e commit 477f3cbCopy full SHA for 477f3cb
src/ur.cpp
@@ -13,8 +13,8 @@ using namespace std;
13
14
namespace ur {
15
16
-UR::UR(const std::string &type, const ByteVector &cbor)
17
- : type_(type), cbor_(cbor)
+UR::UR(std::string type, ByteVector cbor)
+ : type_(std::move(type)), cbor_(std::move(cbor))
18
{
19
if (!is_ur_type(type)) {
20
throw invalid_type();
src/ur.hpp
@@ -24,7 +24,7 @@ class UR {
24
const std::string& type() const { return type_; }
25
const ByteVector& cbor() const { return cbor_; }
26
27
- UR(const std::string& type, const ByteVector& cbor);
+ UR(std::string type, ByteVector cbor);
28
};
29
30
bool operator==(const UR& lhs, const UR& rhs);
0 commit comments