ui: Add utility function to check if a brand is in a list (#939)

* ui: Add utility function to check if a brand is in a list

Introduces `isBrandInList` to simplify checking if a given brand exists within a list of strings. This improves code clarity and avoids repetitive implementations for the same logic.

* Revert "ui: Add utility function to check if a brand is in a list"

This reverts commit 26cde3a73e59cda678c9e017536702de45c8d151.

* ui: Add utility function to check if a brand is in a list
This commit is contained in:
Jason Wen
2025-05-19 13:08:53 -04:00
committed by GitHub
parent c4d202c6bb
commit a6eba52791
@@ -12,6 +12,10 @@
#include "selfdrive/ui/qt/offroad/settings.h"
inline bool isBrandInList(const std::string &brand, const std::vector<std::string> &list) {
return std::find(list.begin(), list.end(), brand) != list.end();
}
class SettingsWindowSP : public SettingsWindow {
Q_OBJECT