summaryrefslogtreecommitdiff
path: root/plugingui/colour.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2018-06-09 17:37:23 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-08-12 11:13:51 +0200
commit31dd927c43f72e76ecb61ea02a7832698b7a9496 (patch)
treec5edd7e3d698a95812e4b752c1a387899d6d1cd5 /plugingui/colour.h
parent873a12d313541e6c82ec9995473bb6f43e7667e8 (diff)
Add map to get instrument name from colour.
Diffstat (limited to 'plugingui/colour.h')
-rw-r--r--plugingui/colour.h9
1 files changed, 9 insertions, 0 deletions
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<float, 4> 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::