DPF

DISTRHO Plugin Framework
Log | Files | Refs | Submodules | README | LICENSE

commit c494e265cf7dafb2ebf8109c3c337157049bab97
parent 148806b33200a8127738de3233b202f78fdfb93d
Author: falkTX <falktx@falktx.com>
Date:   Wed, 17 Aug 2022 10:25:29 +0100

Make Color::withAlpha const

Diffstat:
Mdgl/Color.hpp | 2+-
Mdgl/src/Color.cpp | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dgl/Color.hpp b/dgl/Color.hpp @@ -68,7 +68,7 @@ struct Color { /** Create a new color based on this one but with a different alpha value. */ - Color withAlpha(float alpha) noexcept; + Color withAlpha(float alpha) const noexcept; /** Create a color specified by hue, saturation and lightness. diff --git a/dgl/src/Color.cpp b/dgl/src/Color.cpp @@ -114,7 +114,7 @@ Color::Color(const Color& color1, const Color& color2, const float u) noexcept interpolate(color2, u); } -Color Color::withAlpha(const float alpha2) noexcept +Color Color::withAlpha(const float alpha2) const noexcept { Color color(*this); color.alpha = alpha2;