diff options
author | Jack Lloyd <[email protected]> | 2021-04-04 16:47:11 -0400 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2021-04-05 10:08:21 -0400 |
commit | ec8b0aa05cf08aa356ab0631903597bf178480fd (patch) | |
tree | 164e449557b12c45fd7a0007517a505ea4d29bac /src/lib/x509/x509cert.cpp | |
parent | 262681832f7b58287b17a3d33754f5dc4699b660 (diff) |
More raw pointer removal
Diffstat (limited to 'src/lib/x509/x509cert.cpp')
-rw-r--r-- | src/lib/x509/x509cert.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/lib/x509/x509cert.cpp b/src/lib/x509/x509cert.cpp index 336790336..c742a688f 100644 --- a/src/lib/x509/x509cert.cpp +++ b/src/lib/x509/x509cert.cpp @@ -107,7 +107,7 @@ namespace { std::unique_ptr<X509_Certificate_Data> parse_x509_cert_body(const X509_Object& obj) { - std::unique_ptr<X509_Certificate_Data> data(new X509_Certificate_Data); + auto data = std::make_unique<X509_Certificate_Data>(); BigInt serial_bn; BER_Object public_key; @@ -366,10 +366,7 @@ std::unique_ptr<X509_Certificate_Data> parse_x509_cert_body(const X509_Object& o void X509_Certificate::force_decode() { m_data.reset(); - - std::unique_ptr<X509_Certificate_Data> data = parse_x509_cert_body(*this); - - m_data.reset(data.release()); + m_data = parse_x509_cert_body(*this); } const X509_Certificate_Data& X509_Certificate::data() const |