diff options
author | rumcajs <[email protected]> | 2018-10-14 11:41:00 +0200 |
---|---|---|
committer | rumcajs <[email protected]> | 2018-10-14 11:41:00 +0200 |
commit | 2f53c434f88e1c39e86c978f3523ebc1051996a9 (patch) | |
tree | a2628a317cd5dd105c3ba8a9c7820bef2f0b5450 /src/lib | |
parent | 9249da3c4e87bfbdbe88882e65ae01d1f90e31eb (diff) |
move instead of copy
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/prov/pkcs11/p11_object.cpp | 2 | ||||
-rw-r--r-- | src/lib/tls/msg_cert_req.cpp | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/prov/pkcs11/p11_object.cpp b/src/lib/prov/pkcs11/p11_object.cpp index 5affa43b3..66fe535b3 100644 --- a/src/lib/prov/pkcs11/p11_object.cpp +++ b/src/lib/prov/pkcs11/p11_object.cpp @@ -21,7 +21,7 @@ AttributeContainer::AttributeContainer(ObjectClass object_class) void AttributeContainer::add_class(ObjectClass object_class) { - m_numerics.push_back(static_cast< uint64_t >(object_class)); + m_numerics.emplace_back(static_cast< uint64_t >(object_class)); add_attribute(AttributeType::Class, reinterpret_cast< uint8_t* >(&m_numerics.back()), sizeof(ObjectClass)); } diff --git a/src/lib/tls/msg_cert_req.cpp b/src/lib/tls/msg_cert_req.cpp index 90c936978..3bbdcb1f1 100644 --- a/src/lib/tls/msg_cert_req.cpp +++ b/src/lib/tls/msg_cert_req.cpp @@ -87,7 +87,7 @@ Certificate_Req::Certificate_Req(const std::vector<uint8_t>& buf, if(cert_type_name.empty()) // something we don't know continue; - m_cert_key_types.push_back(cert_type_name); + m_cert_key_types.emplace_back(cert_type_name); } if(version.supports_negotiable_signature_algorithms()) @@ -115,7 +115,7 @@ Certificate_Req::Certificate_Req(const std::vector<uint8_t>& buf, BER_Decoder decoder(name_bits.data(), name_bits.size()); X509_DN name; decoder.decode(name); - m_names.push_back(name); + m_names.emplace_back(name); } } |