Pass BufferParams by address

Spotted by coverity.

Note that this probably fixes a bug in getTokenValue(), where an author
was added to the BufferParams copy.
This commit is contained in:
Jean-Marc Lasgouttes 2020-06-18 11:17:32 +02:00
parent 70ccf9f243
commit 5aadf0879f
2 changed files with 3 additions and 3 deletions

View File

@ -602,7 +602,7 @@ Buffer * copyToTempBuffer(ParagraphList const & paragraphs, DocumentClassConstPt
void putClipboard(ParagraphList const & paragraphs,
DocumentClassConstPtr docclass, docstring const & plaintext,
BufferParams const bp)
BufferParams const & bp)
{
Buffer * buffer = copyToTempBuffer(paragraphs, docclass);
if (!buffer) // already asserted in copyToTempBuffer()

View File

@ -451,7 +451,7 @@ bool getTokenValue(string const & str, char const * token, Length & len)
}
bool getTokenValue(string const & str, char const * token, Change & change, BufferParams bp)
bool getTokenValue(string const & str, char const * token, Change & change, BufferParams & bp)
{
// set the change to be Change() as default as this it should be if not
// in the file format.
@ -574,7 +574,7 @@ string const write_attribute(string const & name, Length const & value)
return value.zero() ? string() : write_attribute(name, value.asString());
}
string const write_attribute(string const & name, Change const & change, BufferParams const bp)
string const write_attribute(string const & name, Change const & change, BufferParams const & bp)
{
odocstringstream ods;
if (change.inserted())