summaryrefslogtreecommitdiff
path: root/src/color.cc
diff options
context:
space:
mode:
authorTim Allen <screwtape@froup.com>2022-02-12 21:35:33 +1100
committerTim Allen <screwtape@froup.com>2022-02-12 21:35:33 +1100
commitd1ea2ffa600fd2a7b14e415b68ceedba3325c5db (patch)
treed7247e5b7f9c57f93c748c26e4faa0a38bcbd174 /src/color.cc
parent0b29fcf32ac756dc54ec5c52db63340c9b3692e9 (diff)
Make Color::validate_alpha() a constexpr function.
We call it from a constexpr constructor, so it needs to be constexpr itself. Fixes #4544.
Diffstat (limited to 'src/color.cc')
-rw-r--r--src/color.cc7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/color.cc b/src/color.cc
index b355b9cf..dfe2e955 100644
--- a/src/color.cc
+++ b/src/color.cc
@@ -34,13 +34,6 @@ bool is_color_name(StringView color)
return contains(color_names, color);
}
-void Color::validate_alpha()
-{
- static_assert(RGB == 17);
- if (a < RGB)
- throw runtime_error("Colors alpha must be > 16");
-}
-
Color str_to_color(StringView color)
{
auto it = find_if(color_names, [&](const char* c){ return color == c; });