Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r51352 - trunk/boost/gil
From: hljin_at_[hidden]
Date: 2009-02-20 14:10:34


Author: hljin
Date: 2009-02-20 14:10:33 EST (Fri, 20 Feb 2009)
New Revision: 51352
URL: http://svn.boost.org/trac/boost/changeset/51352

Log:
GIL: fixed Ticket 784: Wrong initilization of data members in packed_pixel constructors
Text files modified:
   trunk/boost/gil/packed_pixel.hpp | 6 +++---
   1 files changed, 3 insertions(+), 3 deletions(-)

Modified: trunk/boost/gil/packed_pixel.hpp
==============================================================================
--- trunk/boost/gil/packed_pixel.hpp (original)
+++ trunk/boost/gil/packed_pixel.hpp 2009-02-20 14:10:33 EST (Fri, 20 Feb 2009)
@@ -18,7 +18,7 @@
 /// \brief A model of a heterogeneous pixel whose channels are bit ranges. For example 16-bit RGB in '565' format
 /// \author Lubomir Bourdev and Hailin Jin \n
 /// Adobe Systems Incorporated
-/// \date 2005-2007 \n Last updated on September 28, 2006
+/// \date 2005-2009 \n Last updated on February 20, 2009
 ///
 ////////////////////////////////////////////////////////////////////////////////////////
 
@@ -85,11 +85,11 @@
     }
     packed_pixel(int chan0, int chan1, int chan2, int chan3) : _bitfield(0) {
         BOOST_STATIC_ASSERT((num_channels<packed_pixel>::value==4));
- at_c<0>(*this)=chan0; at_c<1>(*this)=chan1; at_c<2>(*this)=chan2; at_c<2>(*this)=chan3;
+ at_c<0>(*this)=chan0; at_c<1>(*this)=chan1; at_c<2>(*this)=chan2; at_c<3>(*this)=chan3;
     }
     packed_pixel(int chan0, int chan1, int chan2, int chan3, int chan4) : _bitfield(0) {
         BOOST_STATIC_ASSERT((num_channels<packed_pixel>::value==5));
- at_c<0>(*this)=chan0; at_c<1>(*this)=chan1; at_c<2>(*this)=chan2; at_c<2>(*this)=chan3; at_c<3>(*this)=chan4;
+ at_c<0>(*this)=chan0; at_c<1>(*this)=chan1; at_c<2>(*this)=chan2; at_c<3>(*this)=chan3; at_c<4>(*this)=chan4;
     }
 
     packed_pixel& operator=(const packed_pixel& p) { _bitfield=p._bitfield; return *this; }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk