src/colors.h

changeset 73
97df974b5ed5
parent 43
08dc62e03a6d
child 89
7abaf1d64719
equal deleted inserted replaced
72:7c27cda03747 73:97df974b5ed5
47 private: 47 private:
48 void loadColorFromString(const QString& string); 48 void loadColorFromString(const QString& string);
49 QMap<qint32, ColorDefinition> definitions; 49 QMap<qint32, ColorDefinition> definitions;
50 }; 50 };
51 51
52 inline bool operator==(const ldraw::Color& one, const ldraw::Color& other) 52 namespace ldraw
53 { 53 {
54 return one.index == other.index; 54 inline bool operator==(const ldraw::Color& one, const ldraw::Color& other)
55 } 55 {
56 return one.index == other.index;
57 }
56 58
57 inline bool operator!=(const ldraw::Color& one, const ldraw::Color& other) 59 inline bool operator!=(const ldraw::Color& one, const ldraw::Color& other)
58 { 60 {
59 return one.index != other.index; 61 return one.index != other.index;
60 } 62 }
61 63
62 inline bool operator<(const ldraw::Color& one, const ldraw::Color& other) 64 inline bool operator<(const ldraw::Color& one, const ldraw::Color& other)
63 { 65 {
64 return one.index < other.index; 66 return one.index < other.index;
65 } 67 }
66 68
67 inline bool operator<=(const ldraw::Color& one, const ldraw::Color& other) 69 inline bool operator<=(const ldraw::Color& one, const ldraw::Color& other)
68 { 70 {
69 return one.index <= other.index; 71 return one.index <= other.index;
70 } 72 }
71 73
72 inline bool operator>(const ldraw::Color& one, const ldraw::Color& other) 74 inline bool operator>(const ldraw::Color& one, const ldraw::Color& other)
73 { 75 {
74 return one.index > other.index; 76 return one.index > other.index;
75 } 77 }
76 78
77 inline bool operator>=(const ldraw::Color& one, const ldraw::Color& other) 79 inline bool operator>=(const ldraw::Color& one, const ldraw::Color& other)
78 { 80 {
79 return one.index >= other.index; 81 return one.index >= other.index;
82 }
80 } 83 }
81 84
82 namespace ldraw 85 namespace ldraw
83 { 86 {
84 static constexpr Color black {0}; 87 static constexpr Color black {0};

mercurial