From 8714c414033cee64c6993305b0862ae9f3e88d31 Mon Sep 17 00:00:00 2001 From: Maxime Coste Date: Tue, 10 Feb 2015 22:53:37 +0000 Subject: [PATCH] Do not hash rgb values for non rgb colors --- src/color.hh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/color.hh b/src/color.hh index 1b3ba9c6..1bf7ee33 100644 --- a/src/color.hh +++ b/src/color.hh @@ -57,7 +57,9 @@ bool is_color_name(StringView color); inline size_t hash_value(const Color& val) { - return hash_values(val.color, val.r, val.g, val.b); + return val.color == Colors::RGB ? + hash_values(val.color, val.r, val.g, val.b) + : hash_value(val.color); } }