TexRow::TextEntry const TexRow::text_none = { -1, 0 };
-TexRow::RowEntry const TexRow::row_none = { false, TexRow::text_none };
+TexRow::RowEntry const TexRow::row_none = { false, { TexRow::text_none } };
bool TexRow::isNone(TextEntry const & t)
bool TexRow::getIdFromRow(int row, int & id, int & pos) const
{
TextEntry t = text_none;
- bool ret = false;
if (row <= int(rowlist_.size()))
while (row > 0 && isNone(t = rowlist_[row - 1].getTextEntry()))
--row;
- if (row > 0)
- ret = true;
id = t.id;
pos = t.pos;
- return ret;
+ return !isNone(t);
}
///prepends the texrow to the source given by tex, for debugging purpose
void TexRow::prepend(docstring_list & tex) const
{
- int const prefix_length = 25;
+ size_type const prefix_length = 25;
if (tex.size() < rowlist_.size())
tex.resize(rowlist_.size());
std::vector<RowEntryList>::const_iterator it = rowlist_.begin();
entry += asString(*it2);
if (entry.length() < prefix_length)
entry = entry + docstring(prefix_length - entry.length(), L' ');
- int i = it - beg;
+ ptrdiff_t i = it - beg;
tex[i] = entry + " " + tex[i];
}
}