Hello,
I substituted all "change" parameters by "change const &" parameters.
Extremely boring but compile-intensive patch.
Michael
Index: paragraph.h
===================================================================
--- paragraph.h (Revision 13823)
+++ paragraph.h (Arbeitskopie)
@@ -236,7 +236,7 @@
void setChangeType(Change::Type type);
/// set change at given pos
- void setChange(lyx::pos_type pos, Change change);
+ void setChange(lyx::pos_type pos, Change const & change);
/// accept change
void acceptChange(lyx::pos_type start, lyx::pos_type end);
@@ -323,15 +323,16 @@
void insert(lyx::pos_type pos, std::string const & str,
LyXFont const & font);
///
- void insertChar(lyx::pos_type pos, value_type c, Change change);
+ void insertChar(lyx::pos_type pos, value_type c, Change const & change);
///
void insertChar(lyx::pos_type pos, value_type c,
- LyXFont const &, Change change);
+ LyXFont const &, Change const & change);
///
- void insertInset(lyx::pos_type pos, InsetBase * inset, Change change);
+ void insertInset(lyx::pos_type pos, InsetBase * inset,
+ Change const & change);
///
void insertInset(lyx::pos_type pos, InsetBase * inset,
- LyXFont const &, Change change);
+ LyXFont const &, Change const & change);
///
bool insetAllowed(InsetBase_code code);
///
Index: paragraph_pimpl.C
===================================================================
--- paragraph_pimpl.C (Revision 13819)
+++ paragraph_pimpl.C (Arbeitskopie)
@@ -176,7 +176,7 @@
}
-void Paragraph::Pimpl::setChange(pos_type pos, Change change)
+void Paragraph::Pimpl::setChange(pos_type pos, Change const & change)
{
if (!tracking())
return;
@@ -278,7 +278,7 @@
}
-void Paragraph::Pimpl::insertChar(pos_type pos, value_type c, Change change)
+void Paragraph::Pimpl::insertChar(pos_type pos, value_type c, Change const & change)
{
BOOST_ASSERT(pos <= size());
@@ -311,8 +311,8 @@
}
-void Paragraph::Pimpl::insertInset(pos_type pos,
- InsetBase * inset, Change change)
+void Paragraph::Pimpl::insertInset(pos_type pos, InsetBase * inset,
+ Change const & change)
{
BOOST_ASSERT(inset);
BOOST_ASSERT(pos <= size());
Index: paragraph_pimpl.h
===================================================================
--- paragraph_pimpl.h (Revision 13819)
+++ paragraph_pimpl.h (Arbeitskopie)
@@ -55,7 +55,7 @@
/// set change type for the entire par
void setChangeType(Change::Type type);
/// set change at given pos
- void setChange(lyx::pos_type pos, Change change);
+ void setChange(lyx::pos_type pos, Change const & change);
/// accept change
void acceptChange(lyx::pos_type start, lyx::pos_type end);
/// reject change
@@ -68,9 +68,9 @@
///
void setChar(lyx::pos_type pos, value_type c);
///
- void insertChar(lyx::pos_type pos, value_type c, Change change);
+ void insertChar(lyx::pos_type pos, value_type c, Change const & change);
///
- void insertInset(lyx::pos_type pos, InsetBase * inset, Change change);
+ void insertInset(lyx::pos_type pos, InsetBase * inset, Change const & change);
/// definite erase
void eraseIntern(lyx::pos_type pos);
/// erase the given position. Returns true if it was actually erased
Index: changes.C
===================================================================
--- changes.C (Revision 13818)
+++ changes.C (Arbeitskopie)
@@ -96,7 +96,7 @@
}
-void Changes::record(Change const change, pos_type const pos)
+void Changes::record(Change const & change, pos_type const pos)
{
if (lyxerr.debugging(Debug::CHANGES)) {
lyxerr[Debug::CHANGES] << "record " << change.type
@@ -118,7 +118,7 @@
}
-void Changes::set(Change const change, pos_type const pos)
+void Changes::set(Change const & change, pos_type const pos)
{
set(change, pos, pos + 1);
}
@@ -137,7 +137,7 @@
}
-void Changes::set(Change const change,
+void Changes::set(Change const & change,
pos_type const start, pos_type const end)
{
ChangeTable::iterator it = table_.begin();
@@ -254,7 +254,7 @@
}
-void Changes::del(Change const change, ChangeTable::size_type const pos)
+void Changes::del(Change const & change, ChangeTable::size_type const pos)
{
// this case happens when building from .lyx
if (table_.empty()) {
@@ -283,7 +283,7 @@
}
-void Changes::add(Change const change, ChangeTable::size_type const pos)
+void Changes::add(Change const & change, ChangeTable::size_type const pos)
{
ChangeTable::iterator it = table_.begin();
ChangeTable::iterator end = table_.end();
Index: changes.h
===================================================================
--- changes.h (Revision 13823)
+++ changes.h (Arbeitskopie)
@@ -58,7 +58,7 @@
}
/// set the position to the given change
- void set(Change change, lyx::pos_type pos);
+ void set(Change const & change, lyx::pos_type pos);
/// set the position to the given change
void set(Change::Type, lyx::pos_type pos);
@@ -67,10 +67,10 @@
void set(Change::Type, lyx::pos_type start, lyx::pos_type end);
/// set the range to the given change
- void set(Change, lyx::pos_type start, lyx::pos_type end);
+ void set(Change const & change, lyx::pos_type start, lyx::pos_type end);
/// mark the given change and adjust
- void record(Change, lyx::pos_type pos);
+ void record(Change const & change, lyx::pos_type pos);
/// return the change at the given position
Change const lookup(lyx::pos_type pos) const;
@@ -124,8 +124,9 @@
class ChangeRange {
public:
- ChangeRange(lyx::pos_type s, lyx::pos_type e, Change c)
+ ChangeRange(lyx::pos_type s, lyx::pos_type e, Change const & c)
: range(Range(s, e)), change(c) {}
+
Range range;
Change change;
};
@@ -139,10 +140,10 @@
Change::Type empty_type_;
/// handle a delete, either logical or physical (see erase)
- void del(Change change, ChangeTable::size_type pos);
+ void del(Change const & change, ChangeTable::size_type pos);
/// handle an add, adjusting range bounds past it
- void add(Change change, ChangeTable::size_type pos);
+ void add(Change const & change, ChangeTable::size_type pos);
/// merge neighbouring ranges, assuming that they are abutting
/// (as done by set())
Index: paragraph.C
===================================================================
--- paragraph.C (Revision 13823)
+++ paragraph.C (Arbeitskopie)
@@ -259,28 +259,29 @@
void Paragraph::insertChar(pos_type pos, Paragraph::value_type c,
- Change change)
+ Change const & change)
{
pimpl_->insertChar(pos, c, change);
}
void Paragraph::insertChar(pos_type pos, Paragraph::value_type c,
- LyXFont const & font, Change change)
+ LyXFont const & font, Change const & change)
{
pimpl_->insertChar(pos, c, change);
setFont(pos, font);
}
-void Paragraph::insertInset(pos_type pos, InsetBase * inset, Change change)
+void Paragraph::insertInset(pos_type pos, InsetBase * inset,
+ Change const & change)
{
pimpl_->insertInset(pos, inset, change);
}
void Paragraph::insertInset(pos_type pos, InsetBase * inset,
- LyXFont const & font, Change change)
+ LyXFont const & font, Change const & change)
{
pimpl_->insertInset(pos, inset, change);
setFont(pos, font);
@@ -1657,7 +1658,7 @@
}
-void Paragraph::setChange(lyx::pos_type pos, Change change)
+void Paragraph::setChange(lyx::pos_type pos, Change const & change)
{
pimpl_->setChange(pos, change);
}