Skip to content

Commit 6a9ff04

Browse files
committed
Minor Cleanups
1 parent ad64219 commit 6a9ff04

File tree

5 files changed

+6
-9
lines changed

5 files changed

+6
-9
lines changed

include/hyperion/PriorityMuxer.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// QT includes
88
#include <QMap>
99
#include <QObject>
10-
#include <QMap>
1110
#include <QVector>
1211

1312
// Utils includes
@@ -16,8 +15,8 @@
1615
#include <utils/Components.h>
1716

1817
// global defines
19-
#define SMOOTHING_MODE_DEFAULT 0
20-
#define SMOOTHING_MODE_PAUSE 1
18+
constexpr auto SMOOTHING_MODE_DEFAULT = 0;
19+
constexpr auto SMOOTHING_MODE_PAUSE = 1;
2120

2221
class QTimer;
2322
class Logger;

include/leddevice/LedDeviceWrapper.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
#include <utils/ColorRgb.h>
77
#include <utils/Components.h>
88

9-
#include <QMutex>
109
#include <QScopedPointer>
1110

1211
class LedDevice;

include/mdns/MdnsBrowser.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
#include <QByteArray>
1818
#include <QMap>
1919
#include <QJsonArray>
20+
#include <QSharedPointer>
2021
#include <QScopedPointer>
2122

2223
// Utility includes
2324
#include <utils/Logger.h>
24-
#include <utils/WeakConnect.h>
2525

2626
namespace {
2727
constexpr std::chrono::milliseconds DEFAULT_DISCOVER_TIMEOUT{ 500 };

libsrc/api/JsonInfo.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
#include <api/API.h>
55

66
#include <utils/ColorSys.h>
7-
#include <hyperion/GrabberWrapper.h>
87
#include <leddevice/LedDeviceWrapper.h>
98
#include <utils/SysInfo.h>
109
#include <hyperion/AuthManager.h>
@@ -21,7 +20,6 @@
2120
#include <effectengine/EffectFileHandler.h>
2221
#endif
2322

24-
2523
QJsonObject JsonInfo::getInfo(const Hyperion* hyperion, Logger* log)
2624
{
2725
QJsonObject info {};
@@ -429,7 +427,7 @@ QJsonArray JsonInfo::getComponents(const Hyperion* hyperion)
429427
components = componentRegister.getRegister();
430428
}
431429

432-
for (auto comp : components)
430+
for (const auto& comp : components)
433431
{
434432
QJsonObject item;
435433
item["name"] = QString::fromStdString(hyperion::componentToIdString(comp.first));
@@ -622,7 +620,7 @@ QJsonObject JsonInfo::discoverSources(const QString& sourceType, const QJsonObje
622620
template<typename GrabberType>
623621
void JsonInfo::discoverGrabber(QJsonArray& inputs, const QJsonObject& params) const
624622
{
625-
GrabberType grabber;
623+
GrabberType grabber{};
626624
QJsonValue discoveryResult = grabber.discover(params);
627625

628626
if (discoveryResult.isArray())

libsrc/leddevice/LedDeviceWrapper.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ LedDeviceWrapper::LedDeviceWrapper(Hyperion* hyperion)
2727
, _hyperion(hyperion)
2828
, _ledDevice(nullptr)
2929
, _isEnabled(false)
30+
, _isOn(false)
3031
{
3132
QString const subComponent = parent()->property("instance").toString();
3233
_log = Logger::getInstance("LEDDEVICE", subComponent);

0 commit comments

Comments
 (0)