~ubuntu-branches/ubuntu/utopic/inkscape/utopic-proposed

« back to all changes in this revision

Viewing changes to src/2geom/sbasis.h

  • Committer: Package Import Robot
  • Author(s): Alex Valavanis
  • Date: 2014-08-19 19:10:32 UTC
  • mfrom: (1.6.5) (2.5.14 sid)
  • Revision ID: package-import@ubuntu.com-20140819191032-2eca1qihaszjk9i6
Tags: 0.48.5-2ubuntu1
* Merge with Debian Unstable (LP: #1358863). Fixes several Ubuntu bugs:
  - Illustrator CS SVG won't load: namespace URIs in entities (LP: #166371)
  - inkscape crashed with SIGSEGV in
    sp_dtw_color_profile_event() (LP: #966441)
  - inkscape crashed with SIGSEGV (LP: #1051017)
  - inkscape crashed with SIGSEGV in Inkscape::Preferences::_getNode()
    (LP: #1163241)
  - save a copy reverts to save as (LP: #529843)
  - Extension to braille not working on Xubuntu 12.10 (LP: #1090865)
* Remaining changes:
  - debian/control:
    + Set Ubuntu Developer as maintainer,
    + build-depend on dh-translation to handle Ubuntu translation,
    + demote pstoedit from Recommends to Suggests (because it's in universe),
  - debian/patches/0006_add_unity_quicklist_support.patch: add.
  - debian/patches/series: update.
  - debian/rules:
    + add dh_translation to handle Ubuntu translation
* Drop debian/patches/librevenge.patch (superseded by
    debian/patches/0006-Update_to_new_libwpg.patch)

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
        return d[i];
76
76
    }
77
77
    Linear& operator[](unsigned i) { return d.at(i); }
78
 
    Linear const* begin() const { return (Linear const*)&*d.begin();}
79
 
    Linear const* end() const { return (Linear const*)&*d.end();}
80
 
    Linear* begin() { return (Linear*)&*d.begin();}
81
 
    Linear* end() { return (Linear*)&*d.end();}
 
78
        
 
79
    //Linear const* begin() const { return (Linear const*)&*d.begin();}
 
80
    //Linear const* end() const { return (Linear const*)&*d.end();}
 
81
    //Linear* begin() { return (Linear*)&*d.begin();}
 
82
    //Linear* end() { return (Linear*)&*d.end();}
 
83
        
 
84
        std::vector<Linear>::const_iterator begin() const { return d.begin(); }
 
85
        std::vector<Linear>::const_iterator end() const { return d.end(); }
 
86
        
 
87
        std::vector<Linear>::iterator begin() { return d.begin(); }
 
88
        std::vector<Linear>::iterator end() { return d.end(); }
 
89
        
82
90
    bool empty() const {return d.empty();}
83
91
    Linear &back() {return d.back();}
84
92
    Linear const &back() const {return d.back();}
87
95
    void resize(unsigned n, Linear const& l) { d.resize(n, l);}
88
96
    void reserve(unsigned n) { d.reserve(n);}
89
97
    void clear() {d.clear();}
90
 
    void insert(Linear* before, const Linear* src_begin, const Linear* src_end) { d.insert(std::vector<Linear>::iterator(before), src_begin, src_end);}
 
98
        
 
99
    void insert(std::vector<Linear>::iterator before, std::vector<Linear>::const_iterator src_begin, std::vector<Linear>::const_iterator src_end) {
 
100
                d.insert(before, src_begin, src_end);
 
101
        }
 
102
        
91
103
    //void insert(Linear* aa, Linear* bb, Linear* cc} { d.insert(aa, bb, cc);}
92
104
    Linear& at(unsigned i) { return d.at(i);}
93
105
    //void insert(Linear* before, int& n, Linear const &l) { d.insert(std::vector<Linear>::iterator(before), n, l);}
283
295
 
284
296
inline SBasis truncate(SBasis const &a, unsigned terms) {
285
297
    SBasis c;
286
 
    c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
 
298
        
 
299
        std::vector<Linear>::const_iterator e = a.begin();
 
300
        std::advance(e, std::min(terms, (unsigned)a.size()));
 
301
        
 
302
    //c.insert(c.begin(), a.begin(), a.begin() + std::min(terms, (unsigned)a.size()));
 
303
        c.insert(c.begin(), a.begin(), e);
 
304
        
287
305
    return c;
288
306
}
289
307