Remove unnecessary scalar product for colour

This commit is contained in:
Danny Robson 2012-06-13 14:41:02 +10:00
parent 15a573f3a7
commit 393d380001
2 changed files with 5 additions and 11 deletions

View File

@ -20,20 +20,14 @@
#include "colour.hpp"
#include "range.hpp"
//-----------------------------------------------------------------------------
using namespace util;
colour&
colour::operator*= (double v) {
red *= v;
green *= v;
blue *= v;
alpha *= v;
return *this;
}
//-----------------------------------------------------------------------------
const json::node&
util::operator>> (const json::node &node, colour &c) {
c.red = node[0].as_number ();
@ -50,6 +44,7 @@ util::operator>> (const json::node &node, colour &c) {
}
//-----------------------------------------------------------------------------
namespace util {
template<>
colour
@ -67,6 +62,7 @@ namespace util {
}
//-----------------------------------------------------------------------------
std::ostream&
util::operator<< (std::ostream &os, const util::colour &c) {
os << "colour(" << c.red << ", " << c.green << ", " << c.blue << ", " << c.alpha << ")";

View File

@ -27,8 +27,6 @@
namespace util {
struct colour {
colour& operator*= (double);
double red;
double green;
double blue;