Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 677058 | Differences between
and this patch

Collapse All | Expand All

(-)a/src/ui/dialog/document-properties.cpp.ORIG (-1 / +1 lines)
Lines 563-569 Link Here
563
}
563
}
564
564
565
struct _cmp {
565
struct _cmp {
566
  bool operator()(const SPObject * const & a, const SPObject * const & b)
566
  bool operator()(const SPObject * const & a, const SPObject * const & b) const
567
  {
567
  {
568
    const Inkscape::ColorProfile &a_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*a);
568
    const Inkscape::ColorProfile &a_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*a);
569
    const Inkscape::ColorProfile &b_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*b);
569
    const Inkscape::ColorProfile &b_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*b);
(-)a/src/vanishing-point.h.ORIG (-5 / +5 lines)
Lines 78-84 Link Here
78
        return _persp = persp;
78
        return _persp = persp;
79
    }
79
    }
80
80
81
    inline bool hasBox (SPBox3D *box) {
81
    inline bool hasBox (SPBox3D *box) const {
82
        return persp3d_has_box(_persp, box);
82
        return persp3d_has_box(_persp, box);
83
    }
83
    }
84
    inline unsigned int numberOfBoxes() const {
84
    inline unsigned int numberOfBoxes() const {
Lines 104-110 Link Here
104
        g_return_if_fail (_persp);
104
        g_return_if_fail (_persp);
105
        persp3d_get_VP (_persp, _axis).print("");
105
        persp3d_get_VP (_persp, _axis).print("");
106
    }
106
    }
107
    inline char const *axisString () { return Proj::string_from_axis(_axis); }
107
    inline char const *axisString () const { return Proj::string_from_axis(_axis); }
108
108
109
    unsigned int my_counter;
109
    unsigned int my_counter;
110
    static unsigned int global_counter; // FIXME: Only to implement operator< so that we can merge lists. Do this in a better way!!
110
    static unsigned int global_counter; // FIXME: Only to implement operator< so that we can merge lists. Do this in a better way!!
Lines 116-122 Link Here
116
struct VPDrag;
116
struct VPDrag;
117
117
118
struct less_ptr : public std::binary_function<VanishingPoint *, VanishingPoint *, bool> {
118
struct less_ptr : public std::binary_function<VanishingPoint *, VanishingPoint *, bool> {
119
    bool operator()(VanishingPoint *vp1, VanishingPoint *vp2) {
119
    bool operator()(VanishingPoint *vp1, VanishingPoint *vp2) const {
120
        return GPOINTER_TO_INT(vp1) < GPOINTER_TO_INT(vp2);
120
        return GPOINTER_TO_INT(vp1) < GPOINTER_TO_INT(vp2);
121
    }
121
    }
122
};
122
};
Lines 144-151 Link Here
144
    void updateTip();
144
    void updateTip();
145
145
146
    unsigned int numberOfBoxes(); // the number of boxes linked to all VPs of the dragger
146
    unsigned int numberOfBoxes(); // the number of boxes linked to all VPs of the dragger
147
    VanishingPoint *findVPWithBox(SPBox3D *box);
147
    VanishingPoint *findVPWithBox(SPBox3D *box) const;
148
    std::set<VanishingPoint*, less_ptr> VPsOfSelectedBoxes();
148
    std::set<VanishingPoint*, less_ptr> VPsOfSelectedBoxes() const;
149
149
150
    bool hasPerspective(const Persp3D *persp);
150
    bool hasPerspective(const Persp3D *persp);
151
    void mergePerspectives(); // remove duplicate perspectives
151
    void mergePerspectives(); // remove duplicate perspectives
(-)a/src/vanishing-point.cpp.ORIG (-5 / +5 lines)
Lines 382-398 Link Here
382
}
382
}
383
383
384
VanishingPoint *
384
VanishingPoint *
385
VPDragger::findVPWithBox (SPBox3D *box) {
385
VPDragger::findVPWithBox (SPBox3D *box) const {
386
    for (std::list<VanishingPoint>::iterator vp = vps.begin(); vp != vps.end(); ++vp) {
386
    for (std::list<VanishingPoint>::const_iterator vp = vps.begin(); vp != vps.end(); ++vp) {
387
        if ((*vp).hasBox(box)) {
387
        if ((*vp).hasBox(box)) {
388
            return &(*vp);
388
            return const_cast<VanishingPoint*>(&(*vp));
389
        }
389
        }
390
    }
390
    }
391
    return NULL;
391
    return NULL;
392
}
392
}
393
393
394
std::set<VanishingPoint*, less_ptr>
394
std::set<VanishingPoint*, less_ptr>
395
VPDragger::VPsOfSelectedBoxes() {
395
VPDragger::VPsOfSelectedBoxes() const {
396
    std::set<VanishingPoint*, less_ptr> sel_vps;
396
    std::set<VanishingPoint*, less_ptr> sel_vps;
397
    VanishingPoint *vp;
397
    VanishingPoint *vp;
398
    // FIXME: Should we take the selection from the parent VPDrag? I guess it shouldn't make a difference.
398
    // FIXME: Should we take the selection from the parent VPDrag? I guess it shouldn't make a difference.
Lines 402-408 Link Here
402
        SPItem *item = *i;
402
        SPItem *item = *i;
403
        SPBox3D *box = dynamic_cast<SPBox3D *>(item);
403
        SPBox3D *box = dynamic_cast<SPBox3D *>(item);
404
        if (box) {
404
        if (box) {
405
            vp = this->findVPWithBox(box);
405
            vp = const_cast<VPDragger*>(this)->findVPWithBox(box);
406
            if (vp) {
406
            if (vp) {
407
                sel_vps.insert (vp);
407
                sel_vps.insert (vp);
408
            }
408
            }
(-)a/src/ui/widget/color-icc-selector.cpp.ORIG (-1 / +1 lines)
Lines 673-679 Link Here
673
673
674
#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
674
#if defined(HAVE_LIBLCMS1) || defined(HAVE_LIBLCMS2)
675
struct _cmp {
675
struct _cmp {
676
  bool operator()(const SPObject * const & a, const SPObject * const & b)
676
  bool operator()(const SPObject * const & a, const SPObject * const & b) const
677
  {
677
  {
678
    const Inkscape::ColorProfile &a_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*a);
678
    const Inkscape::ColorProfile &a_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*a);
679
    const Inkscape::ColorProfile &b_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*b);
679
    const Inkscape::ColorProfile &b_prof = reinterpret_cast<const Inkscape::ColorProfile &>(*b);

Return to bug 677058