mirror of
https://github.com/infiniteCable2/openpilot.git
synced 2026-08-05 08:16:03 +08:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user