summaryrefslogtreecommitdiff
path: root/test/gstreamer/gstreamer_device_provider_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/gstreamer/gstreamer_device_provider_test.cpp')
-rw-r--r--test/gstreamer/gstreamer_device_provider_test.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/test/gstreamer/gstreamer_device_provider_test.cpp b/test/gstreamer/gstreamer_device_provider_test.cpp
index 8b8e7cba..521c60b8 100644
--- a/test/gstreamer/gstreamer_device_provider_test.cpp
+++ b/test/gstreamer/gstreamer_device_provider_test.cpp
@@ -52,19 +52,12 @@ protected:
for (l = devices; l != NULL; l = g_list_next(l)) {
GstDevice *device = GST_DEVICE(l->data);
g_autofree gchar *gst_name;
- bool matched = false;
g_autoptr(GstElement) element = gst_device_create_element(device, NULL);
g_object_get(element, "camera-name", &gst_name, NULL);
- for (auto name : cameraNames) {
- if (strcmp(name.c_str(), gst_name) == 0) {
- matched = true;
- break;
- }
- }
-
- if (!matched)
+ if (std::find(cameraNames.begin(), cameraNames.end(), gst_name) ==
+ cameraNames.end())
return TestFail;
}