Ticket #11636: unused-argument.patch

File unused-argument.patch, 16.7 KB (added by lopresti@…, 7 years ago)

Fix unused variable warnings in Boost.Polygon

  • include/boost/polygon/detail/boolean_op.hpp

    diff --git a/include/boost/polygon/detail/boolean_op.hpp b/include/boost/polygon/detail/boolean_op.hpp
    index d3e3614..70ca4a9 100644
    a b namespace boolean_op {  
    381381  }
    382382
    383383  template <typename Unit>
    384   inline void applyUnaryXOr(std::vector<std::pair<Unit, std::pair<Unit, int> > >& input) {
     384  inline void applyUnaryXOr(std::vector<std::pair<Unit, std::pair<Unit, int> > >& ) {
    385385    BooleanOp<UnaryCount, Unit> booleanXOr;
    386386
    387387  }
  • include/boost/polygon/detail/boolean_op_45.hpp

    diff --git a/include/boost/polygon/detail/boolean_op_45.hpp b/include/boost/polygon/detail/boolean_op_45.hpp
    index b2130ce..9930072 100644
    a b namespace boost { namespace polygon{  
    272272      inline Vertex45T(const Vertex45T& vertex) : pt(vertex.pt), rise(vertex.rise), count(vertex.count) {}
    273273      inline Vertex45T& operator=(const Vertex45T& vertex){
    274274        pt = vertex.pt; rise = vertex.rise; count = vertex.count; return *this; }
    275       inline Vertex45T(const std::pair<Point, Point>& vertex) : pt(), rise(), count() {}
    276       inline Vertex45T& operator=(const std::pair<Point, Point>& vertex){ return *this; }
     275      inline Vertex45T(const std::pair<Point, Point>& ) : pt(), rise(), count() {}
     276      inline Vertex45T& operator=(const std::pair<Point, Point>& ){ return *this; }
    277277      inline bool operator==(const Vertex45T& vertex) const {
    278278        return pt == vertex.pt && rise == vertex.rise && count == vertex.count; }
    279279      inline bool operator!=(const Vertex45T& vertex) const { return !((*this) == vertex); }
    280       inline bool operator==(const std::pair<Point, Point>& vertex) const { return false; }
     280      inline bool operator==(const std::pair<Point, Point>& ) const { return false; }
    281281      inline bool operator!=(const std::pair<Point, Point>& vertex) const { return !((*this) == vertex); }
    282282      inline bool operator<(const Vertex45T& vertex) const {
    283283        if(pt.x() < vertex.pt.x()) return true;
  • include/boost/polygon/detail/polygon_45_formation.hpp

    diff --git a/include/boost/polygon/detail/polygon_45_formation.hpp b/include/boost/polygon/detail/polygon_45_formation.hpp
    index 2e16570..030aecc 100644
    a b namespace boost { namespace polygon{  
    506506      inline bool operator==(const Vertex45CompactT& vertex) const {
    507507        return pt == vertex.pt && count == vertex.count; }
    508508      inline bool operator!=(const Vertex45CompactT& vertex) const { return !((*this) == vertex); }
    509       inline bool operator==(const std::pair<Point, Point>& vertex) const { return false; }
     509      inline bool operator==(const std::pair<Point, Point>& ) const { return false; }
    510510      inline bool operator!=(const std::pair<Point, Point>& vertex) const { return !((*this) == vertex); }
    511511      inline bool operator<(const Vertex45CompactT& vertex) const {
    512512        if(pt.x() < vertex.pt.x()) return true;
    namespace boost { namespace polygon{  
    21532153    inline iterator end() const { return p_->getTail()->end(); }
    21542154    inline std::size_t size() const { return 0; }
    21552155    template<class iT>
    2156     inline PolyLine45HoleData& set(iT inputBegin, iT inputEnd) {
     2156    inline PolyLine45HoleData& set(iT , iT ) {
    21572157      return *this;
    21582158    }
    21592159  private:
    namespace boost { namespace polygon{  
    22222222    inline std::size_t size_holes() const { return 0; }
    22232223    inline std::size_t size() const { return 0; }
    22242224    template<class iT>
    2225     inline PolyLine45PolygonData& set(iT inputBegin, iT inputEnd) {
     2225    inline PolyLine45PolygonData& set(iT , iT ) {
    22262226      return *this;
    22272227    }
    22282228
    22292229    // initialize a polygon from x,y values, it is assumed that the first is an x
    22302230    // and that the input is a well behaved polygon
    22312231    template<class iT>
    2232     inline PolyLine45PolygonData& set_holes(iT inputBegin, iT inputEnd) {
     2232    inline PolyLine45PolygonData& set_holes(iT , iT ) {
    22332233      return *this;
    22342234    }
    22352235  private:
  • include/boost/polygon/detail/polygon_90_set_view.hpp

    diff --git a/include/boost/polygon/detail/polygon_90_set_view.hpp b/include/boost/polygon/detail/polygon_90_set_view.hpp
    index f6ee36c..c2502d3 100644
    a b namespace boost { namespace polygon{  
    200200    return polygon_set.orient(); }
    201201  template <typename ltype, typename rtype, typename op_type>
    202202  bool polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
    203   clean(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
     203  clean(const polygon_90_set_view<ltype, rtype, op_type>& ) {
    204204    return true; }
    205205  template <typename ltype, typename rtype, typename op_type>
    206206  bool polygon_90_set_traits<polygon_90_set_view<ltype, rtype, op_type> >::
    207   sorted(const polygon_90_set_view<ltype, rtype, op_type>& polygon_set) {
     207  sorted(const polygon_90_set_view<ltype, rtype, op_type>& ) {
    208208    return true; }
    209209
    210210  template <typename value_type, typename arg_type>
  • include/boost/polygon/detail/polygon_arbitrary_formation.hpp

    diff --git a/include/boost/polygon/detail/polygon_arbitrary_formation.hpp b/include/boost/polygon/detail/polygon_arbitrary_formation.hpp
    index 6f9eb73..2b62c6b 100644
    a b namespace boost { namespace polygon{  
    338338    };
    339339
    340340    template <typename unsigned_product_type>
    341     static inline void unsigned_mod(unsigned_product_type& result, int& result_sign, unsigned_product_type a, int a_sign, unsigned_product_type b, int b_sign) {
     341    static inline void unsigned_mod(unsigned_product_type& result, int& result_sign, unsigned_product_type a, int a_sign, unsigned_product_type b, int ) {
    342342      result = a % b;
    343343      result_sign = a_sign;
    344344    }
    namespace boost { namespace polygon{  
    739739      inline vertex_half_edge(const vertex_half_edge& vertex) : pt(vertex.pt), other_pt(vertex.other_pt), count(vertex.count) {}
    740740      inline vertex_half_edge& operator=(const vertex_half_edge& vertex){
    741741        pt = vertex.pt; other_pt = vertex.other_pt; count = vertex.count; return *this; }
    742       inline vertex_half_edge(const std::pair<Point, Point>& vertex) : pt(), other_pt(), count() {}
    743       inline vertex_half_edge& operator=(const std::pair<Point, Point>& vertex){ return *this; }
     742      inline vertex_half_edge(const std::pair<Point, Point>& ) : pt(), other_pt(), count() {}
     743      inline vertex_half_edge& operator=(const std::pair<Point, Point>& ){ return *this; }
    744744      inline bool operator==(const vertex_half_edge& vertex) const {
    745745        return pt == vertex.pt && other_pt == vertex.other_pt && count == vertex.count; }
    746746      inline bool operator!=(const vertex_half_edge& vertex) const { return !((*this) == vertex); }
    747       inline bool operator==(const std::pair<Point, Point>& vertex) const { return false; }
     747      inline bool operator==(const std::pair<Point, Point>& ) const { return false; }
    748748      inline bool operator!=(const std::pair<Point, Point>& vertex) const { return !((*this) == vertex); }
    749749      inline bool operator<(const vertex_half_edge& vertex) const {
    750750        if(pt.get(HORIZONTAL) < vertex.pt.get(HORIZONTAL)) return true;
    namespace boost { namespace polygon{  
    12841284      inline vertex_arbitrary_compact& operator=(const vertex_arbitrary_compact& vertex){
    12851285        pt = vertex.pt; count = vertex.count; return *this; }
    12861286      //inline vertex_arbitrary_compact(const std::pair<Point, Point>& vertex) {}
    1287       inline vertex_arbitrary_compact& operator=(const std::pair<Point, Point>& vertex){ return *this; }
     1287      inline vertex_arbitrary_compact& operator=(const std::pair<Point, Point>& ){ return *this; }
    12881288      inline bool operator==(const vertex_arbitrary_compact& vertex) const {
    12891289        return pt == vertex.pt && count == vertex.count; }
    12901290      inline bool operator!=(const vertex_arbitrary_compact& vertex) const { return !((*this) == vertex); }
    1291       inline bool operator==(const std::pair<Point, Point>& vertex) const { return false; }
     1291      inline bool operator==(const std::pair<Point, Point>& ) const { return false; }
    12921292      inline bool operator!=(const std::pair<Point, Point>& vertex) const { return !((*this) == vertex); }
    12931293      inline bool operator<(const vertex_arbitrary_compact& vertex) const {
    12941294        if(pt.get(HORIZONTAL) < vertex.pt.get(HORIZONTAL)) return true;
    namespace boost { namespace polygon{  
    21442144    //inline compact_iterator_type end_compact() const { return compact_iterator_type(end()); }
    21452145    inline std::size_t size() const { return 0; }
    21462146    template<class iT>
    2147     inline poly_line_arbitrary_hole_data& set(iT inputBegin, iT inputEnd) {
     2147    inline poly_line_arbitrary_hole_data& set(iT , iT ) {
    21482148      //assert this is not called
    21492149      return *this;
    21502150    }
    21512151    template<class iT>
    2152     inline poly_line_arbitrary_hole_data& set_compact(iT inputBegin, iT inputEnd) {
     2152    inline poly_line_arbitrary_hole_data& set_compact(iT , iT ) {
    21532153      //assert this is not called
    21542154      return *this;
    21552155    }
    namespace boost { namespace polygon{  
    22202220    inline std::size_t size_holes() const { return 0; }
    22212221    inline std::size_t size() const { return 0; }
    22222222    template<class iT>
    2223     inline poly_line_arbitrary_polygon_data& set(iT inputBegin, iT inputEnd) {
     2223    inline poly_line_arbitrary_polygon_data& set(iT , iT ) {
    22242224      return *this;
    22252225    }
    22262226    template<class iT>
    2227     inline poly_line_arbitrary_polygon_data& set_compact(iT inputBegin, iT inputEnd) {
     2227    inline poly_line_arbitrary_polygon_data& set_compact(iT , iT ) {
    22282228      return *this;
    22292229    }
    22302230    template<class iT>
    2231     inline poly_line_arbitrary_polygon_data& set_holes(iT inputBegin, iT inputEnd) {
     2231    inline poly_line_arbitrary_polygon_data& set_holes(iT , iT ) {
    22322232      return *this;
    22332233    }
    22342234  };
  • include/boost/polygon/detail/polygon_formation.hpp

    diff --git a/include/boost/polygon/detail/polygon_formation.hpp b/include/boost/polygon/detail/polygon_formation.hpp
    index be2f543..7342fef 100644
    a b namespace polygon_formation {  
    617617    }
    618618    inline ActiveTail<Unit>* yield() { return p_; }
    619619    template<class iT>
    620     inline PolyLineHoleData& set(iT inputBegin, iT inputEnd) {
     620    inline PolyLineHoleData& set(iT , iT ) {
    621621      return *this;
    622622    }
    623623    template<class iT>
    624     inline PolyLineHoleData& set_compact(iT inputBegin, iT inputEnd) {
     624    inline PolyLineHoleData& set_compact(iT , iT ) {
    625625      return *this;
    626626    }
    627627   
    namespace polygon_formation {  
    677677    inline std::size_t size_holes() const { return 0; }
    678678    inline std::size_t size() const { return 0; }
    679679    template<class iT>
    680     inline PolyLinePolygonWithHolesData& set(iT inputBegin, iT inputEnd) {
     680    inline PolyLinePolygonWithHolesData& set(iT , iT ) {
    681681      return *this;
    682682    }
    683683    template<class iT>
    684     inline PolyLinePolygonWithHolesData& set_compact(iT inputBegin, iT inputEnd) {
     684    inline PolyLinePolygonWithHolesData& set_compact(iT , iT ) {
    685685      return *this;
    686686    }
    687687   
    688688    // initialize a polygon from x,y values, it is assumed that the first is an x
    689689    // and that the input is a well behaved polygon
    690690    template<class iT>
    691     inline PolyLinePolygonWithHolesData& set_holes(iT inputBegin, iT inputEnd) {
     691    inline PolyLinePolygonWithHolesData& set_holes(iT , iT ) {
    692692      return *this;
    693693    }
    694694  };
  • include/boost/polygon/detail/property_merge.hpp

    diff --git a/include/boost/polygon/detail/property_merge.hpp b/include/boost/polygon/detail/property_merge.hpp
    index b0c843b..3f4dc17 100644
    a b private:  
    509509  }
    510510
    511511  template <typename T, typename T2>
    512   inline void writeGraph(coordinate_type x, T& graph, edge_property_vector& output, T2& scanline) {
     512  inline void writeGraph(coordinate_type , T& graph, edge_property_vector& output, T2& scanline) {
    513513    if(output.empty()) return;
    514514    edge_property* previousEdgeP = &(output[0]);
    515515    bool firstIteration = true;
  • include/boost/polygon/detail/scan_arbitrary.hpp

    diff --git a/include/boost/polygon/detail/scan_arbitrary.hpp b/include/boost/polygon/detail/scan_arbitrary.hpp
    index cee2331..8b06724 100644
    a b namespace boost { namespace polygon{  
    16411641
    16421642    template <typename polygon_with_holes_type>
    16431643    void insert(const polygon_with_holes_type& polygon_with_holes_object, const property_type& property_value, bool is_hole,
    1644                 polygon_with_holes_concept tag) {
     1644                polygon_with_holes_concept ) {
    16451645      insert(polygon_with_holes_object, property_value, is_hole, polygon_concept());
    16461646      for(typename polygon_with_holes_traits<polygon_with_holes_type>::iterator_holes_type itr =
    16471647            begin_holes(polygon_with_holes_object);
  • include/boost/polygon/polygon_90_set_data.hpp

    diff --git a/include/boost/polygon/polygon_90_set_data.hpp b/include/boost/polygon/polygon_90_set_data.hpp
    index 305aa3e..e0a1f9b 100644
    a b namespace boost { namespace polygon{  
    4646
    4747    // constructor from an iterator pair over vertex data
    4848    template <typename iT>
    49     inline polygon_90_set_data(orientation_2d orient, iT input_begin, iT input_end) :
     49    inline polygon_90_set_data(orientation_2d , iT input_begin, iT input_end) :
    5050      orient_(HORIZONTAL), data_(), dirty_(false), unsorted_(false) {
    5151      dirty_ = true;
    5252      unsorted_ = true;
    namespace boost { namespace polygon{  
    119119    }
    120120
    121121    inline void insert(const std::pair<std::pair<point_data<coordinate_type>, point_data<coordinate_type> >, int>& edge, bool is_hole = false,
    122                        orientation_2d orient = HORIZONTAL) {
     122                       orientation_2d = HORIZONTAL) {
    123123      std::pair<coordinate_type, std::pair<coordinate_type, int> > vertex;
    124124      vertex.first = edge.first.first.x();
    125125      vertex.second.first = edge.first.first.y();
  • include/boost/polygon/polygon_set_data.hpp

    diff --git a/include/boost/polygon/polygon_set_data.hpp b/include/boost/polygon/polygon_set_data.hpp
    index 9c6420d..dc05736 100644
    a b namespace boost { namespace polygon {  
    399399    }
    400400
    401401    template <typename scaling_type>
    402     inline polygon_set_data& scale(polygon_set_data& polygon_set,
     402    inline polygon_set_data& scale(polygon_set_data& ,
    403403                                   const scaling_type& scaling) {
    404404      for(typename value_type::iterator itr = begin(); itr != end(); ++itr) {
    405405        bool vb = (*itr).first.first.x() == (*itr).first.second.x();
    namespace boost { namespace polygon {  
    574574    template <typename geometry_type>
    575575    inline polygon_set_data&
    576576    insert_with_resize_dispatch(const geometry_type& poly, coordinate_type resizing, bool corner_fill_arc, unsigned int num_circle_segments, bool hole,
    577                                polygon_with_holes_concept tag) {
     577                               polygon_with_holes_concept ) {
    578578      insert_with_resize_dispatch(poly, resizing, corner_fill_arc, num_circle_segments, hole, polygon_concept());
    579579      for(typename polygon_with_holes_traits<geometry_type>::iterator_holes_type itr =
    580580            begin_holes(poly); itr != end_holes(poly);
    namespace boost { namespace polygon {  
    587587    template <typename geometry_type>
    588588    inline polygon_set_data&
    589589    insert_with_resize_dispatch(const geometry_type& poly, coordinate_type resizing, bool corner_fill_arc, unsigned int num_circle_segments, bool hole,
    590                           polygon_concept tag) {
     590                          polygon_concept ) {
    591591
    592592      if (resizing==0)
    593593         return *this;
  • include/boost/polygon/polygon_traits.hpp

    diff --git a/include/boost/polygon/polygon_traits.hpp b/include/boost/polygon/polygon_traits.hpp
    index dddbf34..20835ef 100644
    a b namespace boost { namespace polygon{  
    185185    template <typename iT>
    186186    static inline T& set_compact(T& t, iT input_begin, iT input_end) {
    187187      typedef iterator_points_to_compact<iT, typename polygon_traits<T>::point_type> iTp;
    188       t.set_points(iTp(polygon_traits<T>::begin_points(t)), iTp(polygon_traits<T>::end_points(t)));
     188      t.set_points(iTp(input_begin), iTp(input_end));
    189189      return t;
    190190    }
    191191  };
    namespace boost { namespace polygon{  
    15671567    typedef const hole_type* iterator_holes_type;
    15681568    static inline iterator_holes_type begin_holes(const hole_type& t) { return &t; }
    15691569    static inline iterator_holes_type end_holes(const hole_type& t) { return &t; }
    1570     static inline std::size_t size_holes(const hole_type& t) { return 0; }
     1570    static inline std::size_t size_holes(const hole_type& ) { return 0; }
    15711571  };
    15721572
    15731573  template <typename T>