From f091ca1d37102ea3e9cbe5ac78dd567b23a2c4ba Mon Sep 17 00:00:00 2001 From: wmayer Date: Sun, 26 Feb 2023 11:41:30 +0100 Subject: [PATCH] App: fix some Lint issues: * readability-identifier-length * cppcoreguidelines-pro-type-member-init --- src/App/Color.cpp | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/src/App/Color.cpp b/src/App/Color.cpp index 1d74c335f3..eda3f54a16 100644 --- a/src/App/Color.cpp +++ b/src/App/Color.cpp @@ -33,35 +33,36 @@ using namespace App; -Color::Color(float R, float G, float B, float A) - : r(R) - , g(G) - , b(B) - , a(A) +Color::Color(float red, float green, float blue, float alpha) + : r(red) + , g(green) + , b(blue) + , a(alpha) { } Color::Color(uint32_t rgba) + : Color{} { - setPackedValue( rgba ); + setPackedValue(rgba); } -bool Color::operator==(const Color& c) const +bool Color::operator==(const Color& color) const { - return getPackedValue() == c.getPackedValue(); + return getPackedValue() == color.getPackedValue(); } -bool Color::operator!=(const Color& c) const +bool Color::operator!=(const Color& color) const { - return !operator==(c); + return !operator==(color); } -void Color::set(float R, float G, float B, float A) +void Color::set(float red, float green, float blue, float alpha) { - r = R; - g = G; - b = B; - a = A; + r = red; + g = green; + b = blue; + a = alpha; } Color& Color::setPackedValue(uint32_t rgba)