mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
General tidy up
This commit is contained in:
@@ -13,7 +13,7 @@ NetOrigin::NetOrigin(QObject* parent, Logger* log)
|
||||
NetOrigin::instance = this;
|
||||
}
|
||||
|
||||
bool NetOrigin::accessAllowed(const QHostAddress& address, const QHostAddress& local)
|
||||
bool NetOrigin::accessAllowed(const QHostAddress& address, const QHostAddress& local) const
|
||||
{
|
||||
if(_internetAccessAllowed)
|
||||
return true;
|
||||
@@ -29,7 +29,7 @@ bool NetOrigin::accessAllowed(const QHostAddress& address, const QHostAddress& l
|
||||
return true;
|
||||
}
|
||||
|
||||
bool NetOrigin::isLocalAddress(const QHostAddress& address, const QHostAddress& local)
|
||||
bool NetOrigin::isLocalAddress(const QHostAddress& address, const QHostAddress& local) const
|
||||
{
|
||||
if(address.protocol() == QAbstractSocket::IPv4Protocol)
|
||||
{
|
||||
|
@@ -4,9 +4,9 @@
|
||||
#include <QByteArray>
|
||||
namespace Process {
|
||||
|
||||
void restartHyperion(bool asNewProcess){}
|
||||
void restartHyperion(bool asNewProcess) {}
|
||||
|
||||
QByteArray command_exec(QString /*cmd*/, QByteArray /*data*/)
|
||||
QByteArray command_exec(const QString& /*cmd*/, const QByteArray& /*data*/)
|
||||
{
|
||||
return QSTRING_CSTR(QString());
|
||||
}
|
||||
@@ -48,7 +48,7 @@ void restartHyperion(bool asNewProcess)
|
||||
QCoreApplication::quit();
|
||||
}
|
||||
|
||||
QByteArray command_exec(QString cmd, QByteArray data)
|
||||
QByteArray command_exec(const QString& cmd, const QByteArray& data)
|
||||
{
|
||||
char buffer[128];
|
||||
QString result;
|
||||
|
@@ -31,9 +31,9 @@ void Rgb_to_Rgbw(ColorRgb input, ColorRgbw * output, const WhiteAlgorithm algori
|
||||
{
|
||||
// http://forum.garagecube.com/viewtopic.php?t=10178
|
||||
// warm white
|
||||
float F1 = static_cast<float>(0.274);
|
||||
float F2 = static_cast<float>(0.454);
|
||||
float F3 = static_cast<float>(2.333);
|
||||
const float F1(0.274);
|
||||
const float F2(0.454);
|
||||
const float F3(2.333);
|
||||
|
||||
output->white = qMin(input.red*F1,qMin(input.green*F2,input.blue*F3));
|
||||
output->red = input.red - output->white/F1;
|
||||
@@ -46,9 +46,9 @@ void Rgb_to_Rgbw(ColorRgb input, ColorRgbw * output, const WhiteAlgorithm algori
|
||||
{
|
||||
// http://forum.garagecube.com/viewtopic.php?t=10178
|
||||
// cold white
|
||||
float F1 = static_cast<float>(0.299);
|
||||
float F2 = static_cast<float>(0.587);
|
||||
float F3 = static_cast<float>(0.114);
|
||||
const float F1(0.299);
|
||||
const float F2(0.587);
|
||||
const float F3(0.114);
|
||||
|
||||
output->white = qMin(input.red*F1,qMin(input.green*F2,input.blue*F3));
|
||||
output->red = input.red - output->white/F1;
|
||||
|
Reference in New Issue
Block a user