[cscore] Fix clang-tidy warnings (#5404)

This commit is contained in:
Tyler Veness
2023-06-19 23:35:13 -07:00
committed by GitHub
parent 1501607e48
commit 1c20c69793

View File

@@ -270,8 +270,9 @@ void UsbCameraImpl::DeviceDisconnect() {
}
static bool IsPercentageProperty(std::string_view name) {
if (wpi::starts_with(name, "raw_"))
if (wpi::starts_with(name, "raw_")) {
name = wpi::substr(name, 4);
}
return name == "Brightness" || name == "Contrast" || name == "Saturation" ||
name == "Hue" || name == "Sharpness" || name == "Gain" ||
name == "Exposure";