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:
@@ -203,7 +203,7 @@ CdmResponseType ServiceCertificate::Init(const std::string& certificate) {
|
||||
|
||||
CdmResponseType ServiceCertificate::VerifySignedMessage(
|
||||
const std::string& message, const std::string& signature) {
|
||||
if (public_key_.get() == nullptr) {
|
||||
if (!public_key_) {
|
||||
LOGE("Service certificate not set");
|
||||
return DEVICE_CERTIFICATE_ERROR_4;
|
||||
}
|
||||
@@ -216,7 +216,7 @@ CdmResponseType ServiceCertificate::VerifySignedMessage(
|
||||
|
||||
CdmResponseType ServiceCertificate::EncryptRsaOaep(const std::string& plaintext,
|
||||
std::string* ciphertext) {
|
||||
if (public_key_.get() == nullptr) {
|
||||
if (!public_key_) {
|
||||
LOGE("Service certificate not set");
|
||||
return DEVICE_CERTIFICATE_ERROR_4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user