summary refs log tree commit diff
path: root/src/Utils.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-12-08 20:52:57 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-12-08 21:10:27 +0100
commit77002f17c8b945bcb4c1c6163c3216c3a8a9fb83 (patch)
tree25a7a2b4043e41f9cb7401164c8c9b7f3a6999c5 /src/Utils.cpp
parentMerge branch 'gitlab-ci' into 'master' (diff)
downloadnheko-77002f17c8b945bcb4c1c6163c3216c3a8a9fb83.tar.xz
lint
Diffstat (limited to 'src/Utils.cpp')
-rw-r--r--src/Utils.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Utils.cpp b/src/Utils.cpp
index 463c8af3..7fcaf5e2 100644
--- a/src/Utils.cpp
+++ b/src/Utils.cpp
@@ -638,8 +638,8 @@ utils::luminance(const QColor &col)
         qreal lumRgb[3];
 
         for (int i = 0; i < 3; i++) {
-                qreal v                  = colRgb[i] / 255.0;
-                v <= 0.03928 ? lumRgb[i] = v / 12.92 : lumRgb[i] = qPow((v + 0.055) / 1.055, 2.4);
+                qreal v   = colRgb[i] / 255.0;
+                lumRgb[i] = v <= 0.03928 ? v / 12.92 : qPow((v + 0.055) / 1.055, 2.4);
         }
 
         auto lum = lumRgb[0] * 0.2126 + lumRgb[1] * 0.7152 + lumRgb[2] * 0.0722;