summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorm0dB <79429057+m0dB@users.noreply.github.com>2023-05-13 14:17:29 +0200
committerm0dB <79429057+m0dB@users.noreply.github.com>2023-05-27 01:28:25 +0200
commit60132d54823a9e9646012943207a36635788bb13 (patch)
tree6cd3a2cc175a4a5aaca53e543edc91a34e65c491 /src
parent298033e36f1b0fbbe28212c5977a9036111f1f05 (diff)
use p prefix for pointers
Diffstat (limited to 'src')
-rw-r--r--src/util/colorcomponents.cpp48
-rw-r--r--src/util/colorcomponents.h6
2 files changed, 27 insertions, 27 deletions
diff --git a/src/util/colorcomponents.cpp b/src/util/colorcomponents.cpp
index d9ef5d94a3..c7b5fcf9b4 100644
--- a/src/util/colorcomponents.cpp
+++ b/src/util/colorcomponents.cpp
@@ -1,46 +1,46 @@
#include "util/colorcomponents.h"
-void getHsvF(const QColor& color, float* h, float* s, float* v, float* a) {
+void getHsvF(const QColor& color, float* pH, float* pS, float* pV, float* pA) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
- color.getHsvF(h, s, v, a);
+ color.getHsvF(pH, pS, pV, pA);
#else
qreal qh, qs, qv, qa;
- color.getHsvF(&qh, &qs, &qv, a ? &qa : nullptr);
- *h = static_cast<float>(qh);
- *s = static_cast<float>(qs);
- *v = static_cast<float>(qv);
- if (a) {
- *a = static_cast<float>(qa);
+ color.getHsvF(&qh, &qs, &qv, pA ? &qa : nullptr);
+ *pH = static_cast<float>(qh);
+ *pS = static_cast<float>(qs);
+ *pV = static_cast<float>(qv);
+ if (pA) {
+ *pA = static_cast<float>(qa);
}
#endif
}
-void getHslF(const QColor& color, float* h, float* s, float* l, float* a) {
+void getHslF(const QColor& color, float* pH, float* pS, float* pL, float* pA) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
- color.getHslF(h, s, l, a);
+ color.getHslF(pH, pS, pL, pA);
#else
qreal qh, qs, ql, qa;
- color.getHslF(&qh, &qs, &ql, a ? &qa : nullptr);
- *h = static_cast<float>(qh);
- *s = static_cast<float>(qs);
- *l = static_cast<float>(ql);
- if (a) {
- *a = static_cast<float>(qa);
+ color.getHslF(&qh, &qs, &ql, pA ? &qa : nullptr);
+ *pH = static_cast<float>(qh);
+ *pS = static_cast<float>(qs);
+ *pL = static_cast<float>(ql);
+ if (pA) {
+ *pA = static_cast<float>(qa);
}
#endif
}
-void getRgbF(const QColor& color, float* r, float* g, float* b, float* a) {
+void getRgbF(const QColor& color, float* pR, float* pG, float* pB, float* pA) {
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
- color.getRgbF(r, g, b, a);
+ color.getRgbF(pR, pG, pB, pA);
#else
qreal qr, qg, qb, qa;
- color.getRgbF(&qr, &qg, &qb, a ? &qa : nullptr);
- *r = static_cast<float>(qr);
- *g = static_cast<float>(qg);
- *b = static_cast<float>(qb);
- if (a) {
- *a = static_cast<float>(qa);
+ color.getRgbF(&qr, &qg, &qb, pA ? &qa : nullptr);
+ *pR = static_cast<float>(qr);
+ *pG = static_cast<float>(qg);
+ *pB = static_cast<float>(qb);
+ if (pA) {
+ *pA = static_cast<float>(qa);
}
#endif
}
diff --git a/src/util/colorcomponents.h b/src/util/colorcomponents.h
index 9b2487f19e..1c014b2ab8 100644
--- a/src/util/colorcomponents.h
+++ b/src/util/colorcomponents.h
@@ -2,6 +2,6 @@
#include <QColor>
-void getHsvF(const QColor& color, float* h, float* s, float* v, float* a = nullptr);
-void getHslF(const QColor& color, float* h, float* s, float* l, float* a = nullptr);
-void getRgbF(const QColor& color, float* r, float* g, float* b, float* a = nullptr);
+void getHsvF(const QColor& color, float* pH, float* pS, float* pV, float* pA = nullptr);
+void getHslF(const QColor& color, float* pH, float* pS, float* pL, float* pA = nullptr);
+void getRgbF(const QColor& color, float* pR, float* pG, float* pB, float* pA = nullptr);