mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Utils: simplified string list lookup
This commit is contained in:
parent
2e32b7e299
commit
7f1c4a1c4c
@ -52,22 +52,21 @@ obs_bounds_type getBoundsTypeFromName(QString name) {
|
||||
}
|
||||
|
||||
bool Utils::StringInStringList(char** strings, const char* string) {
|
||||
size_t index = 0;
|
||||
char* value = nullptr;
|
||||
|
||||
while (1) {
|
||||
value = strings[index];
|
||||
|
||||
if (value == nullptr) {
|
||||
if (!strings) {
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t index = 0;
|
||||
while (strings[index] != NULL) {
|
||||
char* value = strings[index];
|
||||
|
||||
if (strcmp(value, string) == 0) {
|
||||
return true;
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user