diff options
author | David Benjamin <davidben@google.com> | 2023-07-04 12:48:02 -0400 |
---|---|---|
committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2023-07-11 19:22:41 +0000 |
commit | a36ac0a2e78adc0752a46eb01b7e048272241769 (patch) | |
tree | 7d2c6371e62f05383664ee9a4ebee4b1b9de209c /tool/sign.cc | |
parent | 417069f8b2fd6dd4f8c2f5f69de7c038a2397050 (diff) | |
download | boringssl-a36ac0a2e78adc0752a46eb01b7e048272241769.zip boringssl-a36ac0a2e78adc0752a46eb01b7e048272241769.tar.gz boringssl-a36ac0a2e78adc0752a46eb01b7e048272241769.tar.bz2 |
Use std::make_unique when possible
We've required C++14 for a while now. As we're mostly C with a little
C++, this is less helpful, but may as well avoid bare new where
possible.
Change-Id: Icf3386e3f3b6f2092bb0089ed874cc50985f1a40
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61429
Reviewed-by: Bob Beck <bbe@google.com>
Commit-Queue: David Benjamin <davidben@google.com>
Diffstat (limited to 'tool/sign.cc')
-rw-r--r-- | tool/sign.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/sign.cc b/tool/sign.cc index a511e8d..038d853 100644 --- a/tool/sign.cc +++ b/tool/sign.cc @@ -68,7 +68,7 @@ bool Sign(const std::vector<std::string> &args) { } size_t sig_len = EVP_PKEY_size(key.get()); - std::unique_ptr<uint8_t[]> sig(new uint8_t[sig_len]); + auto sig = std::make_unique<uint8_t[]>(sig_len); if (!EVP_DigestSign(ctx.get(), sig.get(), &sig_len, data.data(), data.size())) { return false; |