all repos — fluxbox @ 60ec2e2177d893f4a62a176dc126652e1a814cf5

custom fork of the fluxbox windowmanager

copy operator
fluxgen fluxgen
commit

60ec2e2177d893f4a62a176dc126652e1a814cf5

parent

489c2f4dd049eda18f61f44bb7c857a69e0445ff

2 files changed, 17 insertions(+), 17 deletions(-)

jump to
M src/FbTk/Color.ccsrc/FbTk/Color.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Color.cc,v 1.8 2004/01/09 21:36:21 fluxgen Exp $ +// $Id: Color.cc,v 1.9 2004/02/28 16:55:22 fluxgen Exp $ #include "Color.hh"

@@ -105,16 +105,16 @@

return true; } -/* - Color &Color::Color::operator = (const Color &col_copy) { - // check for aliasing - if (this == &col_copy) - return *this; - copy(col_copy); - return *this; - } -*/ +Color &Color::Color::operator = (const Color &col_copy) { + // check for aliasing + if (this == &col_copy) + return *this; + + copy(col_copy); + return *this; +} + void Color::free() { if (isAllocated()) {

@@ -137,9 +137,9 @@ }

free(); - allocate(col_copy.red(), - col_copy.green(), - col_copy.blue(), + allocate(col_copy.red()*0xFF, + col_copy.green()*0xFF, + col_copy.blue()*0xFF, col_copy.m_screen); }
M src/FbTk/Color.hhsrc/FbTk/Color.hh

@@ -1,5 +1,5 @@

// Color.hh for Fluxbox Window Manager -// Copyright (c) 2002 Henrik Kinnunen (fluxgen@users.sourceforge.net) +// Copyright (c) 2002-2004 Henrik Kinnunen (fluxgen@users.sourceforge.net) // // from Image.hh for Blackbox - an X11 Window manager // Copyright (c) 1997 - 2000 Brad Hughes (bhughes@tcac.net)

@@ -22,7 +22,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // DEALINGS IN THE SOFTWARE. -// $Id: Color.hh,v 1.6 2003/12/16 17:06:49 fluxgen Exp $ +// $Id: Color.hh,v 1.7 2004/02/28 16:55:22 fluxgen Exp $ #ifndef FBTK_COLOR_HH #define FBTK_COLOR_HH

@@ -46,8 +46,8 @@ /// parses and sets rgb and pixel value from a string

bool setFromString(const char *color_string, int screen); /// TODO don't like this void setPixel(unsigned long pixel) { m_pixel = pixel; } - // TODO - //Color &operator = (const Color &col_copy); + + Color &operator = (const Color &col_copy); inline bool isAllocated() const { return m_allocated; } inline unsigned short red() const { return m_red; }