Replacing NULL with nullptr in core/
[ Merge of http://go/wvgerrit/84647 ] [ Merge of http://go/wvgerrit/84648 ] Replacing most instances of C's NULL with C++'s nullptr. Also changed how a NULL check is performed on smart pointers. They provided an implicit boolean operator for null checks, meaning the underlying pointer does not need to be compared directly (as it was in some places before). Note that clang-format has performed additional changes to some of the test files that have not yet been formatted. Bug: 120602075 Test: Linux and Android unittests Change-Id: I06ddebe34b0ea6dfecedb5527e7e808e32f5269a
This commit is contained in:
@@ -155,7 +155,7 @@ class MockCryptoSession : public TestCryptoSession {
|
||||
class MockPolicyEngine : public PolicyEngine {
|
||||
public:
|
||||
MockPolicyEngine(CryptoSession* crypto)
|
||||
: PolicyEngine("mock_session_id", NULL, crypto) {}
|
||||
: PolicyEngine("mock_session_id", nullptr, crypto) {}
|
||||
MOCK_METHOD1(SetEntitledLicenseKeys,
|
||||
void(const std::vector<video_widevine::WidevinePsshData_EntitledKey>&));
|
||||
};
|
||||
@@ -234,7 +234,7 @@ class CdmLicenseTest : public WvCdmTestBase {
|
||||
|
||||
virtual void CreateCdmLicense() {
|
||||
cdm_license_ = new CdmLicenseTestPeer(kCdmSessionId, clock_);
|
||||
clock_ = NULL;
|
||||
clock_ = nullptr;
|
||||
}
|
||||
|
||||
CdmLicenseTestPeer* cdm_license_;
|
||||
@@ -265,7 +265,7 @@ TEST_F(CdmLicenseTest, InitFail_EmptyToken) {
|
||||
TEST_F(CdmLicenseTest, InitFail_CryptoSessionNull) {
|
||||
CreateCdmLicense();
|
||||
EXPECT_FALSE(cdm_license_->Init(kToken, kClientTokenDrmCert, "", false,
|
||||
kEmptyServiceCertificate, NULL,
|
||||
kEmptyServiceCertificate, nullptr,
|
||||
policy_engine_));
|
||||
}
|
||||
|
||||
@@ -275,7 +275,7 @@ TEST_F(CdmLicenseTest, InitFail_PolicyEngineNull) {
|
||||
CreateCdmLicense();
|
||||
EXPECT_FALSE(cdm_license_->Init(kToken, kClientTokenDrmCert, "", false,
|
||||
kEmptyServiceCertificate, crypto_session_,
|
||||
NULL));
|
||||
nullptr));
|
||||
}
|
||||
|
||||
TEST_F(CdmLicenseTest, InitWithEmptyServiceCert) {
|
||||
|
||||
Reference in New Issue
Block a user