Changeset 54725


Ignore:
Timestamp:
Jul 6, 2009, 8:18:22 PM (9 years ago)
Author:
Hailin Jin
Message:

GIL: fixed GIL GCC 4.4 issues. See details in Ticket #3041.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/boost/gil/bit_aligned_pixel_reference.hpp

    r43565 r54725  
    146146    // Construct from another compatible pixel type
    147147    bit_aligned_pixel_reference(const bit_aligned_pixel_reference& p) : _bit_range(p._bit_range) {}
    148     template <typename BF, typename CR> bit_aligned_pixel_reference(packed_pixel<BF,CR,Layout>& p) : _bit_range(static_cast<data_ptr_t>(&at_c<0>(p)), at_c<0>(p).first_bit()) {
     148    template <typename BF, typename CR> bit_aligned_pixel_reference(packed_pixel<BF,CR,Layout>& p) : _bit_range(static_cast<data_ptr_t>(&gil::at_c<0>(p)), gil::at_c<0>(p).first_bit()) {
    149149        check_compatible<packed_pixel<BF,CR,Layout> >();
    150150    }
  • trunk/boost/gil/color_base.hpp

    r52730 r54725  
    156156
    157157    template <typename E2, typename L2> homogeneous_color_base(const homogeneous_color_base<E2,L2,3>& c) :
    158         _v0(at_c<mapping_transform<Layout,L2,0>::value>(c)),
    159         _v1(at_c<mapping_transform<Layout,L2,1>::value>(c)),
    160         _v2(at_c<mapping_transform<Layout,L2,2>::value>(c)) {}
     158        _v0(gil::at_c<mapping_transform<Layout,L2,0>::value>(c)),
     159        _v1(gil::at_c<mapping_transform<Layout,L2,1>::value>(c)),
     160        _v2(gil::at_c<mapping_transform<Layout,L2,2>::value>(c)) {}
    161161
    162162    // Support for l-value reference proxy copy construction
    163163    template <typename E2, typename L2> homogeneous_color_base(      homogeneous_color_base<E2,L2,3>& c) :
    164         _v0(at_c<mapping_transform<Layout,L2,0>::value>(c)),
    165         _v1(at_c<mapping_transform<Layout,L2,1>::value>(c)),
    166         _v2(at_c<mapping_transform<Layout,L2,2>::value>(c)) {}
     164        _v0(gil::at_c<mapping_transform<Layout,L2,0>::value>(c)),
     165        _v1(gil::at_c<mapping_transform<Layout,L2,1>::value>(c)),
     166        _v2(gil::at_c<mapping_transform<Layout,L2,2>::value>(c)) {}
    167167
    168168    // Support for planar_pixel_iterator construction and dereferencing
  • trunk/boost/gil/color_base_algorithm.hpp

    r39339 r54725  
    102102    BOOST_STATIC_CONSTANT(int, semantic_index = (mpl::at_c<typename ColorBase::layout_t::channel_mapping_t,K>::type::value));
    103103    typedef typename kth_element_reference_type<ColorBase,semantic_index>::type type;
    104     static type       get(ColorBase& cb) { return at_c<semantic_index>(cb); }
     104    static type       get(ColorBase& cb) { return gil::at_c<semantic_index>(cb); }
    105105};
    106106
     
    110110    BOOST_STATIC_CONSTANT(int, semantic_index = (mpl::at_c<typename ColorBase::layout_t::channel_mapping_t,K>::type::value));
    111111    typedef typename kth_element_const_reference_type<ColorBase,semantic_index>::type type;
    112     static type       get(const ColorBase& cb) { return at_c<semantic_index>(cb); }
     112    static type       get(const ColorBase& cb) { return gil::at_c<semantic_index>(cb); }
    113113};
    114114
  • trunk/boost/gil/image_view_factory.hpp

    r40850 r54725  
    103103    BOOST_STATIC_ASSERT((boost::is_pointer<typename HomogeneousView::x_iterator>::value));
    104104
    105     return &at_c<0>(view(0,0));
     105    return &gil::at_c<0>(view(0,0));
    106106}
    107107
     
    431431            typedef typename type::x_iterator                            x_iterator_t;
    432432            typedef typename iterator_adaptor_get_base<x_iterator_t>::type x_iterator_base_t;
    433             x_iterator_t sit(x_iterator_base_t(&at_c<K>(src(0,0))),src.pixels().pixel_size());
     433            x_iterator_t sit(x_iterator_base_t(&gil::at_c<K>(src(0,0))),src.pixels().pixel_size());
    434434            return type(src.dimensions(),locator_t(sit, src.pixels().row_size()));
    435435        }
     
    445445        static type make(const View& src) {
    446446            typedef typename type::x_iterator x_iterator_t;
    447             return interleaved_view(src.width(),src.height(),(x_iterator_t)&at_c<K>(src(0,0)), src.pixels().row_size());
     447            return interleaved_view(src.width(),src.height(),(x_iterator_t)&gil::at_c<K>(src(0,0)), src.pixels().row_size());
    448448        }
    449449    };
     
    495495
    496496        result_type operator()(argument_type srcP) const {
    497             return result_type(at_c<K>(srcP));
     497            return result_type(gil::at_c<K>(srcP));
    498498        }
    499499    };
  • trunk/boost/gil/packed_pixel.hpp

    r51352 r54725  
    8282    packed_pixel(int chan0, int chan1, int chan2) : _bitfield(0) {
    8383        BOOST_STATIC_ASSERT((num_channels<packed_pixel>::value==3));
    84         at_c<0>(*this)=chan0; at_c<1>(*this)=chan1; at_c<2>(*this)=chan2;
     84        gil::at_c<0>(*this)=chan0; gil::at_c<1>(*this)=chan1; gil::at_c<2>(*this)=chan2;
    8585    }
    8686    packed_pixel(int chan0, int chan1, int chan2, int chan3) : _bitfield(0) {
  • trunk/boost/gil/pixel.hpp

    r39339 r54725  
    144144private:
    145145    static void check_gray() {  BOOST_STATIC_ASSERT((is_same<typename Layout::color_space_t, gray_t>::value)); }
    146     template <typename Channel> void assign(const Channel& chan, mpl::false_)       { check_gray(); at_c<0>(*this)=chan; }
    147     template <typename Channel> bool equal (const Channel& chan, mpl::false_) const { check_gray(); return at_c<0>(*this)==chan; }
     146    template <typename Channel> void assign(const Channel& chan, mpl::false_)       { check_gray(); gil::at_c<0>(*this)=chan; }
     147    template <typename Channel> bool equal (const Channel& chan, mpl::false_) const { check_gray(); return gil::at_c<0>(*this)==chan; }
    148148public:
    149     pixel&  operator= (channel_t chan)       { check_gray(); at_c<0>(*this)=chan; return *this; }
    150     bool    operator==(channel_t chan) const { check_gray(); return at_c<0>(*this)==chan; }
     149    pixel&  operator= (channel_t chan)       { check_gray(); gil::at_c<0>(*this)=chan; return *this; }
     150    bool    operator==(channel_t chan) const { check_gray(); return gil::at_c<0>(*this)==chan; }
    151151};
    152152
  • trunk/boost/gil/planar_pixel_iterator.hpp

    r39339 r54725  
    110110
    111111    // PERFORMANCE_CHECK: Remove?
    112     bool operator< (const planar_pixel_iterator& ptr)   const { return at_c<0>(*this)< at_c<0>(ptr); }
    113     bool operator!=(const planar_pixel_iterator& ptr)   const { return at_c<0>(*this)!=at_c<0>(ptr); }
     112    bool operator< (const planar_pixel_iterator& ptr)   const { return gil::at_c<0>(*this)< gil::at_c<0>(ptr); }
     113    bool operator!=(const planar_pixel_iterator& ptr)   const { return gil::at_c<0>(*this)!=gil::at_c<0>(ptr); }
    114114private:
    115115    friend class boost::iterator_core_access;
     
    120120    reference dereference() const { return this->template deref<reference>(); }
    121121
    122     ptrdiff_t distance_to(const planar_pixel_iterator& it) const { return at_c<0>(it)-at_c<0>(*this); }
    123     bool equal(const planar_pixel_iterator& it) const { return at_c<0>(*this)==at_c<0>(it); }
     122    ptrdiff_t distance_to(const planar_pixel_iterator& it) const { return gil::at_c<0>(it)-gil::at_c<0>(*this); }
     123    bool equal(const planar_pixel_iterator& it) const { return gil::at_c<0>(*this)==gil::at_c<0>(it); }
    124124};
    125125
  • trunk/libs/gil/test/pixel.cpp

    r42001 r54725  
    3535
    3636using namespace boost::gil;
    37 using namespace std;
     37using std::swap;
    3838using namespace boost;
     39
    3940void error_if(bool condition);
    4041
     
    6465        // test homogeneous algorithms - fill, max, min
    6566        static const int num_chan = num_channels<typename C2::pixel_t>::value;
    66         static_fill(C2::_pixel, at_c<0>(C1::_pixel)+1);
    67         error_if(at_c<0>(C2::_pixel) != at_c<num_chan-1>(C2::_pixel));
     67        static_fill(C2::_pixel, gil::at_c<0>(C1::_pixel)+1);
     68        error_if(gil::at_c<0>(C2::_pixel) != gil::at_c<num_chan-1>(C2::_pixel));
    6869
    6970        C2::_pixel = C1::_pixel;
     
    108109
    109110        static_generate(C2::_pixel, set_to_one());
    110         error_if(at_c<0>(C2::_pixel) != 1);
     111        error_if(gil::at_c<0>(C2::_pixel) != 1);
    111112
    112113        // Test swap if both are mutable and if their value type is the same
     
    314315    error_if(bgr8[0] == rgb8[0]);
    315316    error_if(dynamic_at_c(bgr8,0) == dynamic_at_c(rgb8,0));
    316     error_if(at_c<0>(bgr8) == at_c<0>(rgb8));
     317    error_if(gil::at_c<0>(bgr8) == gil::at_c<0>(rgb8));
    317318    error_if(semantic_at_c<0>(bgr8) != semantic_at_c<0>(rgb8));
    318319    error_if(get_color(bgr8,blue_t()) != get_color(rgb8,blue_t()));
Note: See TracChangeset for help on using the changeset viewer.