Use unique_ptr in oemcrypto ref

Merge from Widevine repo of http://go/wvgerrit/95945

The reference oemcrypto and testbed still use old style pointers, even
though we now require a more modern C++ compiler. Updated a few places
where smart pointer would be appropriate.

Bug: 141393616
Test: Ran unit tests
Change-Id: I8b1e155bce241075928e373478d6f8e1001233f9
This commit is contained in:
Cong Lin
2020-03-25 17:26:32 -07:00
committed by Jeff Tinker
parent d035d76ed6
commit a53a6bf355
4 changed files with 22 additions and 31 deletions

View File

@@ -88,10 +88,11 @@ class UsageTable {
virtual ~UsageTable();
OEMCryptoResult CreateNewUsageEntry(SessionContext* session,
UsageTableEntry** entry,
std::unique_ptr<UsageTableEntry>* entry,
uint32_t* usage_entry_number);
OEMCryptoResult LoadUsageEntry(SessionContext* session,
UsageTableEntry** entry, uint32_t index,
std::unique_ptr<UsageTableEntry>* entry,
uint32_t index,
const std::vector<uint8_t>& buffer,
ODK_ClockValues* clock_values);
OEMCryptoResult UpdateUsageEntry(