Replace typedef with using statement in cdm/core/ files.

[ Merge of http://go/wvgerrit/80805 ]

This change was used only where `typedef` was used for type aliasing,
and not for defining a new type (such as enums, structs, or function
pointer types).

Clang-format was used on the changed files.

Test: WV unit tests
Bug: 134437705
Change-Id: I730b9709a5ac773b3036daa79024caab665b3daa
This commit is contained in:
Alex Dale
2019-06-07 11:15:42 -07:00
parent a178eed57d
commit ce0ea7b20b
10 changed files with 56 additions and 56 deletions

View File

@@ -11,11 +11,11 @@
namespace {
// License protocol aliases
typedef ::video_widevine::License::KeyContainer KeyContainer;
typedef KeyContainer::OutputProtection OutputProtection;
typedef KeyContainer::VideoResolutionConstraint VideoResolutionConstraint;
typedef ::google::protobuf::RepeatedPtrField<VideoResolutionConstraint>
ConstraintList;
using KeyContainer = ::video_widevine::License::KeyContainer;
using OutputProtection = KeyContainer::OutputProtection;
using VideoResolutionConstraint = KeyContainer::VideoResolutionConstraint;
using ConstraintList =
::google::protobuf::RepeatedPtrField<VideoResolutionConstraint>;
// Map the HDCP protection associated with a key in the license to
// an equivalent OEMCrypto HDCP protection level
@@ -49,7 +49,7 @@ wvcdm::CryptoSession::HdcpCapability ProtobufHdcpToOemCryptoHdcp(
// specified resolution, or null if none match
VideoResolutionConstraint* GetConstraintForRes(
uint32_t res, ConstraintList& constraints_from_key) {
typedef ConstraintList::pointer_iterator Iterator;
using Iterator = ConstraintList::pointer_iterator;
for (Iterator i = constraints_from_key.pointer_begin();
i != constraints_from_key.pointer_end(); ++i) {
VideoResolutionConstraint* constraint = *i;

View File

@@ -590,7 +590,7 @@ struct LevelSession {
// 3 function pointers. The Adapter is a global singleton.
class Adapter {
public:
typedef std::map<OEMCrypto_SESSION, LevelSession>::iterator map_iterator;
using map_iterator = std::map<OEMCrypto_SESSION, LevelSession>::iterator;
Adapter() : level1_valid_(false), level1_library_(NULL) {}