Gold linker, CCache, Stats, LGTM

- Increases linker performance under Linux builds by using Gold linker, if available
- ccache is used if available
- removed statistic class (Stats.cpp) from project due to the missing result (sorry @Brindosch)
- add LGTM bandges for code analysis overview

Signed-off-by: Paulchen-Panther <Paulchen-Panter@protonmail.com>
This commit is contained in:
Paulchen-Panther
2019-06-05 18:19:08 +02:00
parent 140d841404
commit 2ccdfeb9e1
71 changed files with 532 additions and 750 deletions

View File

@@ -84,12 +84,12 @@ public:
///
/// @brief get current resulting height of image (after crop)
///
virtual const int getImageWidth() { return _width; };
virtual int getImageWidth() { return _width; };
///
/// @brief get current resulting width of image (after crop)
///
virtual const int getImageHeight() { return _height; };
virtual int getImageHeight() { return _height; };
///
/// @brief Prevent the real capture implementation from capturing if disabled

View File

@@ -168,7 +168,7 @@ public:
/// @param[out] resultMsg The feedback message
/// @return True on success else false
///
const bool saveEffect(const QJsonObject& obj, QString& resultMsg);
bool saveEffect(const QJsonObject& obj, QString& resultMsg);
///
/// @brief Delete an effect by name.
@@ -176,7 +176,7 @@ public:
/// @param[out] resultMsg The message on error
/// @return True on success else false
///
const bool deleteEffect(const QString& effectName, QString& resultMsg);
bool deleteEffect(const QString& effectName, QString& resultMsg);
/// Get the list of available effects
/// @return The list of available effects
@@ -282,7 +282,7 @@ public slots:
/// @param clearEffect Should be true when NOT called from an effect
/// @return True on success, false when priority is not found
///
const bool setInput(const int priority, const std::vector<ColorRgb>& ledColors, const int timeout_ms = -1, const bool& clearEffect = true);
bool setInput(const int priority, const std::vector<ColorRgb>& ledColors, const int timeout_ms = -1, const bool& clearEffect = true);
///
/// @brief Update the current image of a priority (prev registered with registerInput())
@@ -293,14 +293,14 @@ public slots:
/// @param clearEffect Should be true when NOT called from an effect
/// @return True on success, false when priority is not found
///
const bool setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1, const bool& clearEffect = true);
bool setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1, const bool& clearEffect = true);
///
/// @brief Set the given priority to inactive
/// @param priority The priority
/// @return True on success false if not found
///
const bool setInputInactive(const quint8& priority);
bool setInputInactive(const quint8& priority);
///
/// Writes a single color to all the leds for the given time and priority
@@ -336,7 +336,7 @@ public slots:
/// @param[in] priority The priority channel
/// @return True on success else false (not found)
///
const bool clear(int priority);
bool clear(int priority);
///
/// @brief Clears all priority channels. This will switch the leds off until a new priority is written.

View File

@@ -57,8 +57,8 @@ namespace hyperion
///
unsigned height() const;
const unsigned horizontalBorder() const { return _horizontalBorder; };
const unsigned verticalBorder() const { return _verticalBorder; };
unsigned horizontalBorder() { return _horizontalBorder; };
unsigned verticalBorder() { return _verticalBorder; };
///
/// Determines the mean-color for each led using the mapping the image given
@@ -96,9 +96,9 @@ namespace hyperion
// Iterate each led and compute the mean
auto led = ledColors.begin();
for (auto ledColors = _colorsMap.begin(); ledColors != _colorsMap.end(); ++ledColors, ++led)
for (auto colors = _colorsMap.begin(); colors != _colorsMap.end(); ++colors, ++led)
{
const ColorRgb color = calcMeanColor(image, *ledColors);
const ColorRgb color = calcMeanColor(image, *colors);
*led = color;
}
}

View File

@@ -151,7 +151,7 @@ public:
/// @param timeout_ms The new timeout (defaults to -1 endless)
/// @return True on success, false when priority is not found
///
const bool setInput(const int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms = -1);
bool setInput(const int priority, const std::vector<ColorRgb>& ledColors, int64_t timeout_ms = -1);
///
/// @brief Update the current image of a priority (prev registered with registerInput())
@@ -160,14 +160,14 @@ public:
/// @param timeout_ms The new timeout (defaults to -1 endless)
/// @return True on success, false when priority is not found
///
const bool setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1);
bool setInputImage(const int priority, const Image<ColorRgb>& image, int64_t timeout_ms = -1);
///
/// @brief Set the given priority to inactive
/// @param priority The priority
/// @return True on success false if not found
///
const bool setInputInactive(const quint8& priority);
bool setInputInactive(const quint8& priority);
///
/// Clears the specified priority channel and update _currentPriority on success
@@ -175,7 +175,7 @@ public:
/// @param[in] priority The priority of the channel to clear
/// @return True if priority has been cleared else false (not found)
///
const bool clearInput(const uint8_t priority);
bool clearInput(const uint8_t priority);
///
/// Clears all priority channels

View File

@@ -34,7 +34,7 @@ public:
/// @param correct If true will correct json against schema before save
/// @return True on success else false
///
const bool saveSettings(QJsonObject config, const bool& correct = false);
bool saveSettings(QJsonObject config, const bool& correct = false);
///
/// @brief get a single setting json from config