Skip to content
Permalink
Browse files

Fix some lint errors (mostly whitespace)

  • Loading branch information...
aroffringa committed Apr 22, 2019
1 parent c508e96 commit 4e88ff6eb12587050a7c045db62b5c1366c8e4e0
@@ -44,18 +44,17 @@ const char EuroliteProFactory::EXPECTED_PRODUCT_MK2[] = "FT232R USB UART";
const uint16_t EuroliteProFactory::PRODUCT_ID_MK2 = 0x6001;
const uint16_t EuroliteProFactory::VENDOR_ID_MK2 = 0x0403;

const char EuroliteProFactory::ENABLE_EUROLITE_MK2_KEY[] = "enable_eurolite_mk2";
const char EuroliteProFactory::ENABLE_EUROLITE_MK2_KEY[] =
"enable_eurolite_mk2";

EuroliteProFactory::EuroliteProFactory(ola::usb::LibUsbAdaptor *adaptor,
Preferences *preferences)
: BaseWidgetFactory<class EurolitePro>("EuroliteProFactory"),
m_adaptor(adaptor),
m_enable_eurolite_mk2(IsEuroliteMk2Enabled(preferences))
{
m_enable_eurolite_mk2(IsEuroliteMk2Enabled(preferences)) {
}

bool EuroliteProFactory::IsEuroliteMk2Enabled(Preferences *preferences)
{
bool EuroliteProFactory::IsEuroliteMk2Enabled(Preferences *preferences) {
bool enabled;
if (!StringToBool(preferences->GetValue(ENABLE_EUROLITE_MK2_KEY),
&enabled)) {
@@ -44,7 +44,7 @@ class EuroliteProFactory : public BaseWidgetFactory<class EurolitePro> {
const struct libusb_device_descriptor &descriptor);

static bool IsEuroliteMk2Enabled(Preferences *preferences);

private:
ola::usb::LibUsbAdaptor *m_adaptor;
bool m_enable_eurolite_mk2;
@@ -60,7 +60,7 @@ class EuroliteProFactory : public BaseWidgetFactory<class EurolitePro> {
static const char EXPECTED_PRODUCT_MK2[];

static const char ENABLE_EUROLITE_MK2_KEY[];

DISALLOW_COPY_AND_ASSIGN(EuroliteProFactory);
};
} // namespace usbdmx
@@ -109,13 +109,12 @@ bool UsbDmxPlugin::SetDefaultPreferences() {
return true;
}

void UsbDmxPlugin::ConflictsWith(std::set<ola_plugin_id>* conflicting_plugins) const
{
if(EuroliteProFactory::IsEuroliteMk2Enabled(m_preferences))
{
void UsbDmxPlugin::ConflictsWith(
std::set<ola_plugin_id>* conflicting_plugins) const {
if( EuroliteProFactory::IsEuroliteMk2Enabled(m_preferences)) {
conflicting_plugins->insert(OLA_PLUGIN_USBPRO);
conflicting_plugins->insert(OLA_PLUGIN_FTDIDMX);
}
}
}

} // namespace usbdmx
@@ -22,6 +22,7 @@
#define PLUGINS_USBDMX_USBDMXPLUGIN_H_

#include <memory>
#include <set>
#include <string>
#include "ola/base/Macro.h"
#include "ola/plugin_id.h"
@@ -60,8 +61,9 @@ class UsbDmxPlugin: public ola::Plugin {
ola_plugin_id Id() const { return OLA_PLUGIN_USBDMX; }
std::string PluginPrefix() const { return PLUGIN_PREFIX; }

virtual void ConflictsWith(std::set<ola_plugin_id>* conflicting_plugins) const override;

void ConflictsWith(
std::set<ola_plugin_id>* conflicting_plugins) const override;

private:
std::auto_ptr<class PluginImplInterface> m_impl;

0 comments on commit 4e88ff6

Please sign in to comment.
You can’t perform that action at this time.