From f7d5b04e07a874903969d8c55b78ab727d6a1769 Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Sat, 14 May 2016 23:36:50 +0200 Subject: Implement basic multi threading --- src/color.cc | 19 ------------------- src/color.h | 26 +++++++++++++------------- 2 files changed, 13 insertions(+), 32 deletions(-) delete mode 100644 src/color.cc (limited to 'src') 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; -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}; } } -- cgit v1.2.3