Code

NR::Maybe => boost::optional
[inkscape.git] / src / libnrtype / Layout-TNG-OutIter.cpp
index 7a45425c076905fea791ea9b86521dc21065b57d..84307c9cea2ceb1522c4f1878a3b4f4b690d9771 100644 (file)
@@ -201,7 +201,7 @@ Layout::iterator Layout::sourceToIterator(void *source_cookie) const
     return sourceToIterator(source_cookie, Glib::ustring::const_iterator(std::string::const_iterator(NULL)));
 }
 
-NR::Maybe<NR::Rect> Layout::glyphBoundingBox(iterator const &it, double *rotation) const
+boost::optional<NR::Rect> Layout::glyphBoundingBox(iterator const &it, double *rotation) const
 {
    if (rotation) *rotation = _glyphs[it._glyph_index].rotation;
    return _glyphs[it._glyph_index].span(this).font->BBox(_glyphs[it._glyph_index].glyph);
@@ -703,7 +703,7 @@ bool Layout::iterator::nextLineCursor(int n)
     if (line_index == _parent_layout->_lines.size() - 1) 
         return false; // nowhere to go
                else
-        n = MIN (n, _parent_layout->_lines.size() - 1 - line_index);
+        n = MIN (n, static_cast<int>(_parent_layout->_lines.size() - 1 - line_index));
     if (_parent_layout->_lines[line_index + n].in_shape != _parent_layout->_lines[line_index].in_shape) {
         // switching between shapes: adjust the stored x to compensate
         _x_coordinate +=   _parent_layout->_chunks[_parent_layout->_spans[_parent_layout->_lineToSpan(line_index + n)].in_chunk].left_x
@@ -726,7 +726,7 @@ bool Layout::iterator::prevLineCursor(int n)
     if (line_index == 0) 
         return false; // nowhere to go
                else 
-        n = MIN (n, line_index);
+        n = MIN (n, static_cast<int>(line_index));
     if (_parent_layout->_lines[line_index - n].in_shape != _parent_layout->_lines[line_index].in_shape) {
         // switching between shapes: adjust the stored x to compensate
         _x_coordinate +=   _parent_layout->_chunks[_parent_layout->_spans[_parent_layout->_lineToSpan(line_index - n)].in_chunk].left_x