Pass parameters by reference (performance)

Fixes coverity issues 23339 and 23347.

Some additional spacing changes sneaked in.
This commit is contained in:
Jean-Marc 2015-03-04 22:22:18 +01:00
parent fbe333245e
commit 08c9f208fb

View File

@ -58,7 +58,7 @@ static void step(DocIterator & dit, DocIterator const & end, Direction direction
*/
class DocRange {
public:
DocRange(DocIterator from_, DocIterator to_)
DocRange(DocIterator const & from_, DocIterator const & to_)
: from(from_), to(to_)
{}
@ -136,11 +136,11 @@ public:
*/
class DocRangePair {
public:
DocRangePair(DocRange o_, DocRange n_)
DocRangePair(DocRange const & o_, DocRange const & n_)
: o(o_), n(n_)
{}
DocRangePair(DocPair from, DocPair to)
DocRangePair(DocPair const & from, DocPair const & to)
: o(from.o, to.o), n(from.n, to.n)
{}