chore: fix clang-tidy warnings (#38079)

* chore: fix clang-tidy warnings

* refactor: avoid need for NOLINTNEXTLINE
This commit is contained in:
David Sanders 2023-04-26 07:09:54 -07:00 committed by GitHub
parent fe5cdd39d6
commit 08593fd2bd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
20 changed files with 41 additions and 37 deletions

View file

@ -54,7 +54,7 @@ UsbChooserController::UsbChooserController(
}
UsbChooserController::~UsbChooserController() {
RunCallback(/*device=*/nullptr);
RunCallback(/*device_info=*/nullptr);
}
api::Session* UsbChooserController::GetSession() {
@ -85,7 +85,7 @@ void UsbChooserController::OnDeviceRemoved(
void UsbChooserController::OnDeviceChosen(gin::Arguments* args) {
std::string device_id;
if (!args->GetNext(&device_id) || device_id.empty()) {
RunCallback(/*device=*/nullptr);
RunCallback(/*device_info=*/nullptr);
} else {
auto* device_info = chooser_context_->GetDeviceInfo(device_id);
if (device_info) {
@ -95,7 +95,7 @@ void UsbChooserController::OnDeviceChosen(gin::Arguments* args) {
node::Environment* env = node::Environment::GetCurrent(isolate);
EmitWarning(env, "The device id " + device_id + " was not found.",
"UnknownUsbDeviceId");
RunCallback(/*device=*/nullptr);
RunCallback(/*device_info=*/nullptr);
}
}
}
@ -131,7 +131,7 @@ void UsbChooserController::GotUsbDeviceList(
weak_factory_.GetWeakPtr())));
}
if (!prevent_default) {
RunCallback(/*port=*/nullptr);
RunCallback(/*device_info=*/nullptr);
}
}