mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
refactor: Address (Windows) compile warnings (#840)
* Windows compile errors and (Qt 5.15 deprecation) warnings * Usability - Enable/Disable Instance button Co-authored-by: brindosch <edeltraud70@gmx.de>
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include <cstdint>
|
||||
#include <iostream>
|
||||
|
||||
#include <QTextStream>
|
||||
|
||||
struct ColorRgb;
|
||||
|
||||
///
|
||||
@@ -49,6 +51,19 @@ inline std::ostream& operator<<(std::ostream& os, const ColorRgb& color)
|
||||
return os;
|
||||
}
|
||||
|
||||
///
|
||||
/// Stream operator to write ColorRgb to a QTextStream (format "'{'[red]','[green]','[blue]'}'")
|
||||
///
|
||||
/// @param os The output stream
|
||||
/// @param color The color to write
|
||||
/// @return The output stream (with the color written to it)
|
||||
///
|
||||
inline QTextStream& operator<<(QTextStream &os, const ColorRgb& color)
|
||||
{
|
||||
os << "{" << unsigned(color.red) << "," << unsigned(color.green) << "," << unsigned(color.blue) << "}";
|
||||
return os;
|
||||
}
|
||||
|
||||
/// Compare operator to check if a color is 'smaller' than another color
|
||||
inline bool operator<(const ColorRgb & lhs, const ColorRgb & rhs)
|
||||
{
|
||||
|
Reference in New Issue
Block a user