if (it == itend) {
lyxerr[Debug::CHANGES] << "Inserting change at end" << endl;
- table_.push_back(ChangeRange(start, end, change));
+ table_.push_back(ChangeRange(change, Range(start, end)));
merge();
return;
}
// split head
if (c.range.start < start) {
- it = table_.insert(it, ChangeRange(c.range.start, start, c.change));
+ it = table_.insert(it, ChangeRange(c.change, Range(c.range.start, start)));
if (lyxerr.debugging(Debug::CHANGES)) {
lyxerr[Debug::CHANGES] << "Splitting head of type " << c.change.type
<< " over " << c.range.start << "," << start << endl;
// split tail
if (c.range.end > end) {
++it;
- table_.insert(it, ChangeRange(end, c.range.end, c.change));
+ table_.insert(it, ChangeRange(c.change, Range(end, c.range.end)));
if (lyxerr.debugging(Debug::CHANGES)) {
lyxerr[Debug::CHANGES] << "Splitting tail of type " << c.change.type
<< " over " << end << "," << c.range.end << endl;
class ChangeRange {
public:
- ChangeRange(pos_type s, pos_type e, Change const & c)
- : range(Range(s, e)), change(c) {}
- Range range;
+ ChangeRange(Change const & c, Range const & r)
+ : change(c), range(r) {}
+
Change change;
+ Range range;
};
/// merge neighbouring ranges, assuming that they are abutting
typedef std::vector<ChangeRange> ChangeTable;
- /// our table of changes, every row a range and change descriptor
+ /// table of changes, every row a change and range descriptor
ChangeTable table_;
};