Commit 12612d08 authored by kylechar's avatar kylechar Committed by Commit Bot

Fix scoped_refptr construction from NULL

This is a precursor to adding a new scoped_refptr(std::nullptr_t)
constructor. The implicit conversion from NULL to scoped_refptr<T>
causes a compilation error with the new constructor. Replace NULL with
nullptr in any files where this is a problem.

This CL was uploaded by git cl split.

R=reillyg@chromium.org

Bug: 1018887
Change-Id: Idb34b1c7731f9494d8ebc6aa471bc26f16f72619
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1884995
Auto-Submit: kylechar <kylechar@chromium.org>
Reviewed-by: default avatarReilly Grant <reillyg@chromium.org>
Commit-Queue: Reilly Grant <reillyg@chromium.org>
Cr-Commit-Position: refs/heads/master@{#710132}
parent 5c4f1094
...@@ -95,7 +95,7 @@ void HidConnection::Read(ReadCallback callback) { ...@@ -95,7 +95,7 @@ void HidConnection::Read(ReadCallback callback) {
DCHECK(!client_); DCHECK(!client_);
if (device_info_->max_input_report_size() == 0) { if (device_info_->max_input_report_size() == 0) {
HID_LOG(USER) << "This device does not support input reports."; HID_LOG(USER) << "This device does not support input reports.";
std::move(callback).Run(false, NULL, 0); std::move(callback).Run(false, nullptr, 0);
return; return;
} }
...@@ -138,17 +138,17 @@ void HidConnection::GetFeatureReport(uint8_t report_id, ReadCallback callback) { ...@@ -138,17 +138,17 @@ void HidConnection::GetFeatureReport(uint8_t report_id, ReadCallback callback) {
DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_);
if (device_info_->max_feature_report_size() == 0) { if (device_info_->max_feature_report_size() == 0) {
HID_LOG(USER) << "This device does not support feature reports."; HID_LOG(USER) << "This device does not support feature reports.";
std::move(callback).Run(false, NULL, 0); std::move(callback).Run(false, nullptr, 0);
return; return;
} }
if (device_info_->has_report_id() != (report_id != 0)) { if (device_info_->has_report_id() != (report_id != 0)) {
HID_LOG(USER) << "Invalid feature report ID."; HID_LOG(USER) << "Invalid feature report ID.";
std::move(callback).Run(false, NULL, 0); std::move(callback).Run(false, nullptr, 0);
return; return;
} }
if (IsReportIdProtected(report_id)) { if (IsReportIdProtected(report_id)) {
HID_LOG(USER) << "Attempt to get a protected feature report."; HID_LOG(USER) << "Attempt to get a protected feature report.";
std::move(callback).Run(false, NULL, 0); std::move(callback).Run(false, nullptr, 0);
return; return;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment