Pass primitive types by value (#935)

This commit is contained in:
Murat Seker
2020-08-08 13:09:15 +02:00
committed by GitHub
parent 5758b19cbc
commit c00d8e62fb
146 changed files with 505 additions and 505 deletions

View File

@@ -9,7 +9,7 @@
// TODO Remove this class if third-party apps have been migrated (eg. Hyperion Android Grabber, Windows Screen grabber etc.)
ProtoClientConnection::ProtoClientConnection(QTcpSocket* socket, const int &timeout, QObject *parent)
ProtoClientConnection::ProtoClientConnection(QTcpSocket* socket, int timeout, QObject *parent)
: QObject(parent)
, _log(Logger::getInstance("PROTOSERVER"))
, _socket(socket)

View File

@@ -30,28 +30,28 @@ public:
/// @param timeout The timeout when a client is automatically disconnected and the priority unregistered
/// @param parent The parent
///
explicit ProtoClientConnection(QTcpSocket* socket, const int &timeout, QObject *parent);
explicit ProtoClientConnection(QTcpSocket* socket, int timeout, QObject *parent);
signals:
///
/// @brief forward register data to HyperionDaemon
///
void registerGlobalInput(const int priority, const hyperion::Components& component, const QString& origin = "ProtoBuffer", const QString& owner = "", unsigned smooth_cfg = 0);
void registerGlobalInput(int priority, hyperion::Components component, const QString& origin = "ProtoBuffer", const QString& owner = "", unsigned smooth_cfg = 0);
///
/// @brief Forward clear command to HyperionDaemon
///
void clearGlobalInput(const int priority, bool forceClearAll=false);
void clearGlobalInput(int priority, bool forceClearAll=false);
///
/// @brief forward prepared image to HyperionDaemon
///
const bool setGlobalInputImage(const int priority, const Image<ColorRgb>& image, const int timeout_ms, const bool& clearEffect = false);
bool setGlobalInputImage(int priority, const Image<ColorRgb>& image, int timeout_ms, bool clearEffect = false);
///
/// @brief Forward requested color
///
void setGlobalInputColor(const int priority, const std::vector<ColorRgb> &ledColor, const int timeout_ms, const QString& origin = "ProtoBuffer" ,bool clearEffects = true);
void setGlobalInputColor(int priority, const std::vector<ColorRgb> &ledColor, int timeout_ms, const QString& origin = "ProtoBuffer" ,bool clearEffects = true);
///
/// @brief Emits whenever the client disconnected
@@ -62,7 +62,7 @@ public slots:
///
/// @brief Requests a registration from the client
///
void registationRequired(const int priority) { if (_priority == priority) _priority = -1; };
void registationRequired(int priority) { if (_priority == priority) _priority = -1; };
///
/// @brief close the socket and call disconnected()

View File

@@ -35,7 +35,7 @@ void ProtoServer::initServer()
handleSettingsUpdate(settings::PROTOSERVER, _config);
}
void ProtoServer::handleSettingsUpdate(const settings::type& type, const QJsonDocument& config)
void ProtoServer::handleSettingsUpdate(settings::type type, const QJsonDocument& config)
{
if(type == settings::PROTOSERVER)
{