From 1c73a76159cdbcf87aab8da59400ba16d2d37b5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Offringa?= Date: Thu, 3 Aug 2023 11:20:41 +0200 Subject: [PATCH] Fix linting --- plugins/usbdmx/EuroliteProFactory.cpp | 19 +++++++++++-------- plugins/usbdmx/EuroliteProFactory.h | 3 +++ 2 files changed, 14 insertions(+), 8 deletions(-) diff --git a/plugins/usbdmx/EuroliteProFactory.cpp b/plugins/usbdmx/EuroliteProFactory.cpp index 49fd55bc5..302110b3a 100644 --- a/plugins/usbdmx/EuroliteProFactory.cpp +++ b/plugins/usbdmx/EuroliteProFactory.cpp @@ -20,12 +20,12 @@ #include "plugins/usbdmx/EuroliteProFactory.h" +#include + #include "libs/usb/LibUsbAdaptor.h" #include "ola/Logging.h" #include "ola/base/Flags.h" -#include - DECLARE_bool(use_async_libusb); namespace ola { @@ -56,7 +56,8 @@ EuroliteProFactory::EuroliteProFactory(ola::usb::LibUsbAdaptor *adaptor, : BaseWidgetFactory("EuroliteProFactory"), m_adaptor(adaptor), m_enable_eurolite_mk2(IsEuroliteMk2Enabled(preferences)) { - StringSplit(preferences->GetValue(EUROLITE_SERIALS_KEY), m_expected_eurolite_serials, ","); + StringSplit(preferences->GetValue(EUROLITE_SERIALS_KEY), + m_expected_eurolite_serials, ","); } bool EuroliteProFactory::IsEuroliteMk2Enabled(Preferences *preferences) { @@ -93,16 +94,18 @@ bool EuroliteProFactory::DeviceAdded( // Eurolite USB-DMX512-PRO MK2? } else if (descriptor.idVendor == VENDOR_ID_MK2 && descriptor.idProduct == PRODUCT_ID_MK2) { - LibUsbAdaptor::DeviceInformation info; if (!m_adaptor->GetDeviceInfo(usb_device, descriptor, &info)) { return false; } - - const bool serial_matches = std::find(m_expected_eurolite_serials.begin(), m_expected_eurolite_serials.end(), info.serial) != m_expected_eurolite_serials.end(); - + + const bool serial_matches = std::find(m_expected_eurolite_serials.begin(), + m_expected_eurolite_serials.end(), info.serial) != + m_expected_eurolite_serials.end(); + if (m_enable_eurolite_mk2 || serial_matches) { - OLA_INFO << "Found a possible new Eurolite USB-DMX512-PRO MK2 device with serial " << info.serial; + OLA_INFO << "Found a possible new Eurolite USB-DMX512-PRO MK2 device " + "with serial " << info.serial; if (!m_adaptor->CheckManufacturer(EXPECTED_MANUFACTURER_MK2, info)) { return false; diff --git a/plugins/usbdmx/EuroliteProFactory.h b/plugins/usbdmx/EuroliteProFactory.h index 4fb80bcfd..e04f4a973 100644 --- a/plugins/usbdmx/EuroliteProFactory.h +++ b/plugins/usbdmx/EuroliteProFactory.h @@ -21,6 +21,9 @@ #ifndef PLUGINS_USBDMX_EUROLITEPROFACTORY_H_ #define PLUGINS_USBDMX_EUROLITEPROFACTORY_H_ +#include +#include + #include "libs/usb/LibUsbAdaptor.h" #include "ola/base/Macro.h" #include "olad/Preferences.h"