|
Boost-Commit : |
From: hljin_at_[hidden]
Date: 2007-11-05 14:04:09
Author: hljin
Date: 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
New Revision: 40804
URL: http://svn.boost.org/trac/boost/changeset/40804
Log:
GIL: minor cumulative fixes
Text files modified:
trunk/boost/gil/bit_aligned_pixel_iterator.hpp | 1 +
trunk/boost/gil/cmyk.hpp | 6 ++++--
trunk/boost/gil/color_base.hpp | 3 +++
trunk/boost/gil/device_n.hpp | 15 ++++++++++-----
trunk/boost/gil/extension/dynamic_image/apply_operation_base.hpp | 2 +-
trunk/boost/gil/gil_concept.hpp | 2 +-
trunk/boost/gil/pixel_iterator.hpp | 6 ++----
trunk/boost/gil/rgb.hpp | 5 +++--
trunk/boost/gil/rgba.hpp | 5 +++--
9 files changed, 28 insertions(+), 17 deletions(-)
Modified: trunk/boost/gil/bit_aligned_pixel_iterator.hpp
==============================================================================
--- trunk/boost/gil/bit_aligned_pixel_iterator.hpp (original)
+++ trunk/boost/gil/bit_aligned_pixel_iterator.hpp 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
@@ -26,6 +26,7 @@
#include <boost/iterator/iterator_facade.hpp>
#include "gil_config.hpp"
#include "bit_aligned_pixel_reference.hpp"
+#include "pixel_iterator.hpp"
namespace boost { namespace gil {
Modified: trunk/boost/gil/cmyk.hpp
==============================================================================
--- trunk/boost/gil/cmyk.hpp (original)
+++ trunk/boost/gil/cmyk.hpp 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
@@ -18,9 +18,10 @@
/// \brief Support for CMYK color space and variants
/// \author Lubomir Bourdev and Hailin Jin \n
/// Adobe Systems Incorporated
-/// \date 2005-2007 \n Last updated on September 18, 2006
+/// \date 2005-2007 \n Last updated on October 10, 2007
////////////////////////////////////////////////////////////////////////////////////////
+#include <cstddef>
#include "gil_config.hpp"
#include "metafunctions.hpp"
#include <boost/mpl/range_c.hpp>
@@ -54,7 +55,8 @@
/// \ingroup ImageViewConstructors
/// \brief from raw CMYK planar data
template <typename IC>
-inline typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t planar_cmyk_view(int width, int height, IC c, IC m, IC y, IC k, std::ptrdiff_t rowsize_in_bytes) {
+inline typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t
+planar_cmyk_view(std::size_t width, std::size_t height, IC c, IC m, IC y, IC k, std::ptrdiff_t rowsize_in_bytes) {
typedef typename type_from_x_iterator<planar_pixel_iterator<IC,cmyk_t> >::view_t RView;
return RView(width, height, typename RView::locator(planar_pixel_iterator<IC,cmyk_t>(c,m,y,k), rowsize_in_bytes));
}
Modified: trunk/boost/gil/color_base.hpp
==============================================================================
--- trunk/boost/gil/color_base.hpp (original)
+++ trunk/boost/gil/color_base.hpp 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
@@ -35,6 +35,9 @@
namespace boost { namespace gil {
+// Forward-declare
+template <typename P> P* memunit_advanced(const P* p, std::ptrdiff_t diff);
+
// Forward-declare semantic_at_c
template <int K, typename ColorBase>
typename disable_if<is_const<ColorBase>,typename kth_semantic_element_reference_type<ColorBase,K>::type>::type semantic_at_c(ColorBase& p);
Modified: trunk/boost/gil/device_n.hpp
==============================================================================
--- trunk/boost/gil/device_n.hpp (original)
+++ trunk/boost/gil/device_n.hpp 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
@@ -18,9 +18,10 @@
/// \brief Support for color space of N channels and variants
/// \author Lubomir Bourdev and Hailin Jin \n
/// Adobe Systems Incorporated
-/// \date 2005-2007 \n Last updated on March 8, 2006
+/// \date 2005-2007 \n Last updated on October 10, 2007
////////////////////////////////////////////////////////////////////////////////////////
+#include <cstddef>
#include "gil_config.hpp"
#include <boost/type_traits.hpp>
#include <boost/mpl/range_c.hpp>
@@ -61,28 +62,32 @@
/// \ingroup ImageViewConstructors
/// \brief from 2-channel planar data
template <typename IC>
-inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<2> > >::view_t planar_devicen_view(int width, int height, IC c0, IC c1, std::ptrdiff_t rowsize_in_bytes) {
+inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<2> > >::view_t
+planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, std::ptrdiff_t rowsize_in_bytes) {
return typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<2> > >::view_t(width, height, planar_pixel_iterator<IC,devicen_t<2> >(c0,c1), rowsize_in_bytes);
}
/// \ingroup ImageViewConstructors
/// \brief from 3-channel planar data
template <typename IC>
-inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<3> > >::view_t planar_devicen_view(int width, int height, IC c0, IC c1, IC c2, std::ptrdiff_t rowsize_in_bytes) {
+inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<3> > >::view_t
+planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, std::ptrdiff_t rowsize_in_bytes) {
return typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<3> > >::view_t(width, height, planar_pixel_iterator<IC,devicen_t<3> >(c0,c1,c2), rowsize_in_bytes);
}
/// \ingroup ImageViewConstructors
/// \brief from 4-channel planar data
template <typename IC>
-inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<4> > >::view_t planar_devicen_view(int width, int height, IC c0, IC c1, IC c2, IC c3, std::ptrdiff_t rowsize_in_bytes) {
+inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<4> > >::view_t
+planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, std::ptrdiff_t rowsize_in_bytes) {
return typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<4> > >::view_t(width, height, planar_pixel_iterator<IC,devicen_t<4> >(c0,c1,c2,c3), rowsize_in_bytes);
}
/// \ingroup ImageViewConstructors
/// \brief from 5-channel planar data
template <typename IC>
-inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<5> > >::view_t planar_devicen_view(int width, int height, IC c0, IC c1, IC c2, IC c3, IC c4, std::ptrdiff_t rowsize_in_bytes) {
+inline typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<5> > >::view_t
+planar_devicen_view(std::size_t width, std::size_t height, IC c0, IC c1, IC c2, IC c3, IC c4, std::ptrdiff_t rowsize_in_bytes) {
return typename type_from_x_iterator<planar_pixel_iterator<IC,devicen_t<5> > >::view_t(width, height, planar_pixel_iterator<IC,devicen_t<5> >(c0,c1,c2,c3,c4), rowsize_in_bytes);
}
Modified: trunk/boost/gil/extension/dynamic_image/apply_operation_base.hpp
==============================================================================
--- trunk/boost/gil/extension/dynamic_image/apply_operation_base.hpp (original)
+++ trunk/boost/gil/extension/dynamic_image/apply_operation_base.hpp 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
@@ -100,7 +100,7 @@
// Create specializations of apply_operation_fn for each N 0..100
GIL_GENERATE_APPLY_FWD_OPS(99)
-};
+}
// unary application
template <typename Types, typename Bits, typename Op>
Modified: trunk/boost/gil/gil_concept.hpp
==============================================================================
--- trunk/boost/gil/gil_concept.hpp (original)
+++ trunk/boost/gil/gil_concept.hpp 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
@@ -1363,7 +1363,7 @@
typedef typename iterator_adaptor_get_base<Iterator>::type base_t;
gil_function_requires<boost_concepts::ForwardTraversalConcept<base_t> >();
- BOOST_STATIC_ASSERT(is_iterator_adaptor<Iterator>());
+ BOOST_STATIC_ASSERT(is_iterator_adaptor<Iterator>::value);
typedef typename iterator_adaptor_rebind<Iterator, void*>::type rebind_t;
base_t base=it.base(); ignore_unused_variable_warning(base);
Modified: trunk/boost/gil/pixel_iterator.hpp
==============================================================================
--- trunk/boost/gil/pixel_iterator.hpp (original)
+++ trunk/boost/gil/pixel_iterator.hpp 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
@@ -26,6 +26,7 @@
#include <iterator>
#include "gil_config.hpp"
#include "gil_concept.hpp"
+#include "utilities.hpp"
#include "pixel.hpp"
namespace boost { namespace gil {
@@ -132,8 +133,6 @@
return (gil_reinterpret_cast_c<const unsigned char*>(p2)-gil_reinterpret_cast_c<const unsigned char*>(p1));
}
-template <typename P> P* memunit_advanced(const P* p, std::ptrdiff_t diff);
-
template <typename P>
inline void memunit_advance(P* &p, std::ptrdiff_t diff) {
p=(P*)((unsigned char*)(p)+diff);
@@ -141,10 +140,9 @@
template <typename P>
inline P* memunit_advanced(const P* p, std::ptrdiff_t diff) {
- return (P*)((unsigned char*)(p)+diff);
+ return (P*)((char*)(p)+diff);
}
-
// memunit_advanced_ref
// (shortcut to advancing a pointer by a given number of memunits and taking the reference in case the compiler is not smart enough)
Modified: trunk/boost/gil/rgb.hpp
==============================================================================
--- trunk/boost/gil/rgb.hpp (original)
+++ trunk/boost/gil/rgb.hpp 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
@@ -18,9 +18,10 @@
/// \brief Support for RGB color space and variants
/// \author Lubomir Bourdev and Hailin Jin \n
/// Adobe Systems Incorporated
-/// \date 2005-2007 \n Last updated on September 18, 2006
+/// \date 2005-2007 \n Last updated on October 10, 2007
////////////////////////////////////////////////////////////////////////////////////////
+#include <cstddef>
#include <boost/mpl/range_c.hpp>
#include <boost/mpl/vector_c.hpp>
#include "gil_config.hpp"
@@ -55,7 +56,7 @@
template <typename IC>
inline
typename type_from_x_iterator<planar_pixel_iterator<IC,rgb_t> >::view_t
-planar_rgb_view(int width, int height,
+planar_rgb_view(std::size_t width, std::size_t height,
IC r, IC g, IC b,
std::ptrdiff_t rowsize_in_bytes) {
typedef typename type_from_x_iterator<planar_pixel_iterator<IC,rgb_t> >::view_t RView;
Modified: trunk/boost/gil/rgba.hpp
==============================================================================
--- trunk/boost/gil/rgba.hpp (original)
+++ trunk/boost/gil/rgba.hpp 2007-11-05 14:04:08 EST (Mon, 05 Nov 2007)
@@ -17,9 +17,10 @@
/// \brief Support for RGBA color space and variants
/// \author Lubomir Bourdev and Hailin Jin \n
/// Adobe Systems Incorporated
-/// \date 2005-2007 \n Last updated on February 12, 2007
+/// \date 2005-2007 \n Last updated on October 10, 2007
////////////////////////////////////////////////////////////////////////////////////////
+#include <cstddef>
#include "gil_config.hpp"
#include <boost/mpl/contains.hpp>
#include "rgb.hpp"
@@ -48,7 +49,7 @@
template <typename IC>
inline
typename type_from_x_iterator<planar_pixel_iterator<IC,rgba_t> >::view_t
-planar_rgba_view(int width, int height,
+planar_rgba_view(std::size_t width, std::size_t height,
IC r, IC g, IC b, IC a,
std::ptrdiff_t rowsize_in_bytes) {
typedef typename type_from_x_iterator<planar_pixel_iterator<IC,rgba_t> >::view_t RView;
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