diff options
Diffstat (limited to 'libs/canvas/flag.cc')
-rw-r--r-- | libs/canvas/flag.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libs/canvas/flag.cc b/libs/canvas/flag.cc index 3e11f7c1b6..b00426ff92 100644 --- a/libs/canvas/flag.cc +++ b/libs/canvas/flag.cc @@ -80,10 +80,10 @@ Flag::set_text (string const & text) _text->set (text); } - boost::optional<Rect> bbox = _text->bounding_box (); + Rect bbox = _text->bounding_box (); assert (bbox); - Duple flag_size (bbox.get().width() + 10, bbox.get().height() + 4); + Duple flag_size (bbox.width() + 10, bbox.height() + 4); if (_invert) { const Distance h = fabs(_line->y1() - _line->y0()); @@ -101,9 +101,9 @@ Flag::set_height (Distance h) _line->set (Duple (0, 0), Duple (0, h)); if (_invert) { - boost::optional<Rect> bbox = _text->bounding_box (); + Rect bbox = _text->bounding_box (); if (bbox) { - Duple flag_size (bbox.get().width() + 10, bbox.get().height() + 4); + Duple flag_size (bbox.width() + 10, bbox.height() + 4); _rectangle->set (Rect (0, h - flag_size.y, flag_size.x, h)); _text->set_position (Duple (5, h - flag_size.y + 2)); } @@ -123,8 +123,8 @@ Flag::covers (Duple const & point) const double Flag::width () const { - boost::optional<Rect> bbox = _text->bounding_box (); + Rect bbox = _text->bounding_box (); assert (bbox); - return bbox.get().width() + 10; + return bbox.width() + 10; } |