From 0e57d10d77e555a9229f7d522d83f87df7d5180d Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Mon, 26 Sep 2016 12:53:32 -0700 Subject: [core] Modern C++ bindings for OpenGL --- include/mbgl/util/color.hpp | 4 ++++ include/mbgl/util/range.hpp | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include/mbgl/util') diff --git a/include/mbgl/util/color.hpp b/include/mbgl/util/color.hpp index 4be380fde3..7693ce636d 100644 --- a/include/mbgl/util/color.hpp +++ b/include/mbgl/util/color.hpp @@ -17,6 +17,10 @@ public: static constexpr Color black() { return { 0.0f, 0.0f, 0.0f, 1.0f }; }; static constexpr Color white() { return { 1.0f, 1.0f, 1.0f, 1.0f }; }; + static constexpr Color red() { return { 1.0f, 0.0f, 0.0f, 1.0f }; }; + static constexpr Color green() { return { 0.0f, 1.0f, 0.0f, 1.0f }; }; + static constexpr Color blue() { return { 0.0f, 0.0f, 1.0f, 1.0f }; }; + static optional parse(const std::string&); }; diff --git a/include/mbgl/util/range.hpp b/include/mbgl/util/range.hpp index 8da2dd45bb..f7fa92eb8b 100644 --- a/include/mbgl/util/range.hpp +++ b/include/mbgl/util/range.hpp @@ -5,7 +5,7 @@ namespace mbgl { template class Range { public: - Range(const T& min_, const T& max_) + constexpr Range(const T& min_, const T& max_) : min(min_), max(max_) {} T min; -- cgit v1.2.1