From 31dd927c43f72e76ecb61ea02a7832698b7a9496 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Sat, 9 Jun 2018 17:37:23 +0200 Subject: Add map to get instrument name from colour. --- plugingui/colour.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'plugingui/colour.h') diff --git a/plugingui/colour.h b/plugingui/colour.h index 3a135fc..232b0b9 100644 --- a/plugingui/colour.h +++ b/plugingui/colour.h @@ -54,4 +54,13 @@ private: std::array data; }; +struct ColourHasher +{ + // TODO: replace by something reasonable + std::size_t operator()(const Colour& colour) const + { + return 7*colour.red() + 11*colour.green() + 13*colour.blue() + 17*colour.alpha(); + } +}; + } // GUI:: -- cgit v1.2.3