inputflinger: make parameter comment style consistent
The Google C++ style guide [0] suggests that parameter name comments
should be of the form `/*paramName=*/value`. This potentially allows
tooling to check that the parameter names are correct, too.
[0]: https://google.github.io/styleguide/cppguide.html#Function_Argument_Comments
Bug: none
Test: host-side inputflinger_tests
Change-Id: I89625844bcd19d27c43b4f14f1f207ade39a4718
diff --git a/services/inputflinger/reader/controller/PeripheralController.cpp b/services/inputflinger/reader/controller/PeripheralController.cpp
index cedbacb..a380b5e 100644
--- a/services/inputflinger/reader/controller/PeripheralController.cpp
+++ b/services/inputflinger/reader/controller/PeripheralController.cpp
@@ -152,7 +152,7 @@
return std::nullopt;
}
- return toArgb(brightness.value(), 0 /* red */, 0 /* green */, 0 /* blue */);
+ return toArgb(brightness.value(), /*red=*/0, /*green=*/0, /*blue=*/0);
}
std::optional<int32_t> PeripheralController::RgbLight::getLightColor() {
@@ -197,13 +197,12 @@
}
std::unordered_map<LightColor, int32_t> intensities = ret.value();
// Get red, green, blue colors
- int32_t color = toArgb(0 /* brightness */, intensities.at(LightColor::RED) /* red */,
- intensities.at(LightColor::GREEN) /* green */,
- intensities.at(LightColor::BLUE) /* blue */);
+ int32_t color = toArgb(/*brightness=*/0, intensities.at(LightColor::RED),
+ intensities.at(LightColor::GREEN), intensities.at(LightColor::BLUE));
// Get brightness
std::optional<int32_t> brightness = getRawLightBrightness(rawId);
if (brightness.has_value()) {
- return toArgb(brightness.value() /* A */, 0, 0, 0) | color;
+ return toArgb(/*brightness=*/brightness.value(), 0, 0, 0) | color;
}
return std::nullopt;
}
@@ -273,7 +272,7 @@
for (const auto& [lightId, light] : mLights) {
// Input device light doesn't support ordinal, always pass 1.
InputDeviceLightInfo lightInfo(light->name, light->id, light->type, light->capabilityFlags,
- 1 /* ordinal */);
+ /*ordinal=*/1);
deviceInfo->addLightInfo(lightInfo);
}
}