aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAdrian Kummerlaender2016-05-14 23:36:50 +0200
committerAdrian Kummerlaender2016-05-14 23:36:50 +0200
commitf7d5b04e07a874903969d8c55b78ab727d6a1769 (patch)
treeb3fb5142478af4d9fe87299acf5c0d17f94e1600 /src
parentc7de3b623c77162dd1d06103dafcc216e56229d9 (diff)
downloadvoronoi-f7d5b04e07a874903969d8c55b78ab727d6a1769.tar
voronoi-f7d5b04e07a874903969d8c55b78ab727d6a1769.tar.gz
voronoi-f7d5b04e07a874903969d8c55b78ab727d6a1769.tar.bz2
voronoi-f7d5b04e07a874903969d8c55b78ab727d6a1769.tar.lz
voronoi-f7d5b04e07a874903969d8c55b78ab727d6a1769.tar.xz
voronoi-f7d5b04e07a874903969d8c55b78ab727d6a1769.tar.zst
voronoi-f7d5b04e07a874903969d8c55b78ab727d6a1769.zip
Implement basic multi threading
Diffstat (limited to 'src')
-rw-r--r--src/color.cc19
-rw-r--r--src/color.h26
2 files changed, 13 insertions, 32 deletions
diff --git a/src/color.cc b/src/color.cc
deleted file mode 100644
index 9af409a..0000000
--- a/src/color.cc
+++ /dev/null
@@ -1,19 +0,0 @@
-#include "color.h"
-
-namespace imgen {
-
-color red() { return color{255, 0, 0}; }
-color lime() { return color{ 0, 255, 0}; }
-color blue() { return color{ 0, 0, 255}; }
-color yellow() { return color{255, 255, 0}; }
-color cyan() { return color{ 0, 255, 255}; }
-color magenta() { return color{255, 0, 255}; }
-color silver() { return color{192, 192, 192}; }
-color maroon() { return color{128, 0, 0}; }
-color olive() { return color{128, 128, 0}; }
-color green() { return color{ 0, 128, 0}; }
-color purple() { return color{128, 0, 128}; }
-color teal() { return color{ 0, 128, 128}; }
-color navy() { return color{ 0, 0, 128}; }
-
-}
diff --git a/src/color.h b/src/color.h
index 2c35465..514c739 100644
--- a/src/color.h
+++ b/src/color.h
@@ -7,18 +7,18 @@ namespace imgen {
using color = std::tuple<std::uint8_t, std::uint8_t, std::uint8_t>;
-color red();
-color lime();
-color blue();
-color yellow();
-color cyan();
-color magenta();
-color silver();
-color maroon();
-color olive();
-color green();
-color purple();
-color teal();
-color navy();
+constexpr color red() { return color{255, 0, 0}; }
+constexpr color lime() { return color{ 0, 255, 0}; }
+constexpr color blue() { return color{ 0, 0, 255}; }
+constexpr color yellow() { return color{255, 255, 0}; }
+constexpr color cyan() { return color{ 0, 255, 255}; }
+constexpr color magenta() { return color{255, 0, 255}; }
+constexpr color silver() { return color{192, 192, 192}; }
+constexpr color maroon() { return color{128, 0, 0}; }
+constexpr color olive() { return color{128, 128, 0}; }
+constexpr color green() { return color{ 0, 128, 0}; }
+constexpr color purple() { return color{128, 0, 128}; }
+constexpr color teal() { return color{ 0, 128, 128}; }
+constexpr color navy() { return color{ 0, 0, 128}; }
}