Mir

geometry types are too verbose to use

Bug #1199756 reported by Alan Griffiths
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mir
Fix Released
Low
Alan Griffiths

Bug Description

Many of the geometry types lack useful constructors - these should have been added when needed, not the lack worked around.

E.g. we have:

struct Point
{
    X x;
    Y y;
};
Whereas a constructor like:

template<XType, YType>
Point::Point(XType x, YType y) x{x}, y{y} {}

would allow conversions to be applied where valid.

Related branches

Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

I mean I want to write:

void f(int x, int y)
{
    auto p = geom::Point(x, y);
}

Not

void f(int x, int y)
{
    auto p = geom::Point(geom::X(x), geom::Y(y));
}

Revision history for this message
Daniel van Vugt (vanvugt) wrote :
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision 844, scheduled for release in mir, milestone 0.0.7

Changed in mir:
status: New → Fix Committed
Revision history for this message
Alan Griffiths (alan-griffiths) wrote :

The merged branch was just part of the solution

Changed in mir:
status: Fix Committed → In Progress
Changed in mir:
assignee: nobody → Alan Griffiths (alan-griffiths)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

Fix committed into lp:mir at revision None, scheduled for release in mir, milestone 0.0.7

Changed in mir:
status: In Progress → Fix Committed
Changed in mir:
milestone: none → 0.0.7
Changed in mir:
status: Fix Committed → Fix Released
importance: Undecided → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.