From 393d380001de40abefc7efea8e554f8ebb3cace7 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 13 Jun 2012 14:41:02 +1000 Subject: [PATCH] Remove unnecessary scalar product for colour --- colour.cpp | 14 +++++--------- colour.hpp | 2 -- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/colour.cpp b/colour.cpp index 46ff2e28..97fb191d 100644 --- a/colour.cpp +++ b/colour.cpp @@ -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 << ")"; diff --git a/colour.hpp b/colour.hpp index 227a1174..416f993e 100644 --- a/colour.hpp +++ b/colour.hpp @@ -27,8 +27,6 @@ namespace util { struct colour { - colour& operator*= (double); - double red; double green; double blue;